If I set up a page like this:
<html><head><meta http-equiv="refresh" content="0;url=http://internic.net/"></head><body></body></html>
Will the browser send referrer info and other metadata when the redirection is performed?
Meta refresh is a method of instructing a web browser to automatically refresh the current web page or frame after a given time interval, using an HTML meta element with the http-equiv parameter set to " refresh " and a content parameter giving the time interval in seconds.
In HTML and XHTML, one can use the meta element with the value of the http-equiv attribute set to " Refresh " and the value of the content attribute set to "0" (meaning zero seconds), followed by the URI that the browser should request.
The http-equiv attribute provides an HTTP header for the information/value of the content attribute. The http-equiv attribute can be used to simulate an HTTP response header.
Approach 1: One can auto refresh the webpage using the meta tag within the head element of your HTML using the http-equiv property. It is an inbuilt property with HTML 5. One can further add the time period of the refresh using the content attribute within the Meta tag.
In testing here, Firefox and IE do not but Chrome does send the referrer (though this is inconsistent as well), regardless of whether it's going to the same domain or not.
Seeing as I can't find any spec stating what should be the standard behavior, and W3C in general discourages a META redirect, I'm not sure you can ever depend on this being consistent.
I did some additional testing with this. I had three URIs involved (all on the same domain):
/page.html
which had a link to the meta refresh/refresh.html
which used a meta refresh to the destination/destination.html
which used JavaScript to write the referrer into the page.I ran the test in several browsers by opening page.html
and clicking on the link, then observing what the referrer was on the destination. Here are the results:
http://example.com/refresh.html
http://example.com/refresh.html
http://example.com/refresh.html
None of the browsers showed http://example.com/page.html
as the referrer the way that they would with a 301 or 302 redirect. So meta refresh can be used to some extent to obscure the referrer:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With