Upon inspecting Twitter's URL shortening service http://t.co, I noticed that, instead of redirecting to the goal URL using a Location HTTP header and a 3xx HTTP status code, it redirects using the following HTML (formatted for better readability):
<head> <meta name="referrer" content="always"> <noscript> <META http-equiv="refresh" content="0;URL=[URL]"> </noscript> <title>[URL]</title> </head> <script>window.opener = null; location.replace("[URL]")</script>
[URL] would contain the actual goal URL. To be clear: this is the complete HTML content, not just an HTML fragment.
A large/popular service like http://t.co will surely have good reasons to choose this strategy over HTTP header redirection, but I can't think of any.
What are the benefits of choosing this redirection strategy over HTTP header redirection?
I just realized that it might be the
<meta name="referrer" content="always"> tag. Will this keep a possibly existing
Referer request header intact, perhaps?