How do some websites prevent us from going back to the previous page?

201 views

Do you know these shady websites that don’t allow you to go back, only after spamming the previous page button, or in some cases, the only option is to close the tab. How can web devs disable basic browser functions like that?

In: 4

4 Answers

Anonymous 0 Comments

I think what you described is done by making your browser load the page multiple times consecutively, so that if you go back one page, the last page that was loaded was also the page you’re currently on.

I don’t know about other browsers, but in Firefox you can hold the “previous page” button and it shows you the last 14 pages you visited. Many times it showed me that the last 10 pages or so were the page I’m currently on, but the page before that was the page where I originally came from and I was able to get back.

You are viewing 1 out of 4 answers, click here to view all answers.