logoalt Hacker News

dnnddidiejtoday at 5:29 AM4 repliesview on HN

Easy fix:

JS doesn't let you change back button behaviour.

Q. But what about SPA?

A. Draw your own app-level back button top left of page.

Another solution: make it a permisson.


Replies

layer8today at 6:55 AM

Yeah, no thanks. I want to use my browser’s standard keyboard shortcut to navigate back. And also forward again. And I want to be able to inspect the history listing before I go back or forward.

Let the browser do the browsery things. Don’t make SPAs suck even more than they already do.

show 1 reply
kaelwdtoday at 5:47 AM

Can I preventDefault on mouse5? What about the physical back button on Android?

Hamukotoday at 5:42 AM

>Draw your own app-level back button top left of page.

This is the worst idea I’ve heard all day.

sublineartoday at 6:24 AM

Why not just put up a fake captcha page? When the user clicks the link to continue, the back button is now hijacked.