Skip to content Skip to sidebar Skip to footer

Override Browser Back Button

I am working on a project in which i need to handle browser back button and on it's click I want to redirect to home page. I have gone through many post, there are a lot of ways to

Solution 1:

You can't just override a browser's button's behavior.

Imagine the security problems it would cause if anyone could just "Fake" browser navigation like that. Making users think they navigated to a different site is chapter 1 in phishing for dummies...

However, @Aleklinked to a similar question, in the comments on your question, which has a decent alternative (Which is, imo, the best way to achieve the desired result).

Post a Comment for "Override Browser Back Button"