Apr 08, 2016

How do some websites prevent you from using your browser’s back button to leave their site?

Sometimes when I go to a website, when I try to use the “back button” to go back to the site I’d been on before it won’t let me leave. Every time I go “back” it just shows me the same page. What are they doing to prevent me from leaving the website?
When you click the back button you are sent to the previous page. Most of the time when the same page reloads (not always, there's other tricks that could be coded), you are sent to a redirect page that sends you back to the page you tried to leave. In short, imagine when you go to a webpage it goes through a couple of redirects then loads the page, when you click back it loops through the same process.

In most browsers you can go around it by right clicking on the back button and selecting the page you want to go back to from the history list.
Answer this