Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sites should be punished into oblivion for doing this. Why do browsers even allow it? Is there a legitimate use-case for this?

I am maintaining an SPA and the only thing I do is trying to not pollute history. But I'd never try to block the back button.



I think a legitimate use-case is asking for confirmation before leaving the page when filling out a form so that the user doesn't loose their data.


But this can be achieved with other means. I have exactly this on my SPA.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: