I need to do a Javascript based redirect
window.location.href = 'URL';
But I need to remove the referrer from the HTTP headers upon redirection (the target page should see no referrer), how can I do that?
You will need to redirect through another page. You can do a POST to your own page which then does a redirect to the destination. This will show only your intermediate page as the referrer.
Can be disabled via menu Tools > Preferences > Advanced > Network, and uncheck "Send referrer information".
To check the Referer in action go to Inspect Element -> Network check the request header for Referer like below. Referer header is highlighted. Supported Browsers: The browsers are compatible with HTTP header Referer are listed below: Google Chrome.
All decent browsers with default settings will send it, but the enduser can configure it to not send it. It's also dependent on the environmental software.
<a href="redirecturl" rel="noreferrer" id="autoclick">Link</a>
<script>document.getElementById('autoclick').click();</script>
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