how can some websites “trap” the user to their homepages when pressing the back button, but others take you right back to the search page.

898 views

how can some websites “trap” the user to their homepages when pressing the back button, but others take you right back to the search page.

In: Technology

2 Answers

Anonymous 0 Comments

They do this sometimes intentionally, but usually accidently or as an accepted consequence of the way they handle links into their site.

For example, if I run some ads I want to know what ads people are clicking on so I make a landing page that does nothing more than record what ad was clicked on (known at the time of the click and transition between ad-page and landing page (or site), but lost after that) and then redirect the user to the home-page. That means that when the user then clicks on the “back button” they are brought back to a page that did nothing more than redirect them to the homepage. So…if the page one-back from where you are redirects you to where you are, then…the back button doesn’t work very well :).

There are ways a friendly developer would prevent this.

Anonymous 0 Comments

There’s an html element called a redirect; essentially if you make a page that immediately redirects you, your back button history will look like this, in descending order from most to least recent

* Current Site

* Site that redirects to Current Site

* Google

So if you *just* hit back, it takes you to the redirect site.

The trick is to double-click back so that it takes you back to Google through the redirect site, or in a more general sense, right click the back button and click google out of there.

Now, if you chain redirects in certain ways you can make it almost impossible to *just* click back. Some browsers have a built in “too many redirects” feature that will stop the browser after a certain number of redirects, but often they don’t cover all the ways a redirect can occur, and the feature is most useful if you’re working on your own site on the server-level, trying to get a redirect for a legitimate purpose, and not getting infinitely-recursive redirection due to an oopsie.