I'm trying to hide the HTTP header Referer
(referrer) using this script , but it doesn't work:
function open_link(url)
{
instance = window.open("about:blank","_self");
instance.document.write("<meta http-equiv=\"refresh\" content=\"0;url="+url+"\">");
instance.document.close();
return false;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
<button class="myButton" onclick="open_link('https://www.whatismyreferer.com/')">Continuar</button>
Searching in google does not find an exact way to achieve it. I hope you can give me some idea in PHP or javascript.
You can change your page 's referral policies by simply adding the following tag
<meta name="">
to the header:With this, the browser will not send the header
Referer
in any link that is clicked on the page that takes you to an external site, maintaining the internal functionality of the web.With the following it is completely disabled:
You can see the examples of use and behavior in this link .
PS: Doesn't work on legacy Edge or Internet Explorer.
The same function can also be performed using the attribute
rel
to choose the type of link :