how do some websites prevent you from using the ‘back’ button to leave the page?

271 views

Often when I’m googling something I’ll go to a few pages, so I’ll click a link, and then use the back button to return to the search results and find another link. But sometimes the back button just reloads the page, and even tapping it multiple times doesn’t work. How and why do some websites do this? Surely it should be my browser that’s controlling if it goes back or not, rather than the website it’s on?

In: 197

11 Answers

Anonymous 0 Comments

While all of these contents are good, the real answer lies in the coding of the page you are on. The programming. Every thing on the page is an object that can be controlled by the programmer who codes it. Like “Button 1.text = ‘BACK'” would make the button contain the word “BACK”. Buttons, links and other objects can also be turned on and off.

“Button1.Acitve = NO” would tell the computer that this button is not active and clicking it will do nothing. Usually the programmer will also include code to “grey” or dim the appearance of the button to clue you that it is not available.

I started programming in 1969, before we HAD buttons and stuff. The coding I used here is not real, just examples.

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