2

I noticed that many websites, when they redirect you, they show a "redirecting in 5 seconds" page before the actual redirection. What's the purpose of that?

I am currently implementing a links directory and I made it so that the redirection happens instantly via a 301 redirect header response. Why would I want to add that extra loading time? It's not like it would help with website load, actually the contrary as a full page has to load instead of just the response headers.

Cristy
  • 391

3 Answers3

2

For a variety of reasons, a user want to be aware that they are leaving their current website. Also they might not want to be redirected to a different website for a various reasons. This notice informs them and gives them the ability to cancel.

Redirection notifications are used to protect sensitive user information, for example in case there is a threat of phishing.

Imagine you are logged in to a website that has a forum where users can post messages. If a link in one of those messages would redirect you to an external website that is impersonating the original website, a user could be tricked into thinking they are still in the same environment. The external website might try to abuse this confusion to ask for credentials.

Redirect notifications are used to alert a user they are leaving the environment and prevent possible abuse.

Keltari
  • 75,447
2

The biggest reason for a redirect link to be present, is that you can turn off redirection. If a user turns it off, and you redirect them without a timer nor a message, then the user basically comes to a dead-end.

These redirection pages therefor have links on them that the user can click themselves to manually go there.

This is also the case with automatic downloads (redirect to a download link) with the message: click here if your download does not start automatically)

LPChip
  • 66,193
2

This is not done for usability in fact its quite the opposite as it takes away control from the user. Not withstanding simply bad web design and ad walls the type of redirects that do this are typically download links.

There are also click through redirects that might say "leaving this site for that site." which is probably not what you're talking about as they are not usually on a timer which would be more usable.

So when a timer is used its probably intended to prevent the site from being regarded as a popup by the web browser.

HTTP 301 can be and usually is cached. This may not be desirable. Sites may also want to redirect based on a url generated by the client.

jdwolf
  • 2,370