Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove referer from Javascript redirect

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?

like image 885
Flavien Avatar asked May 07 '13 09:05

Flavien


People also ask

How do I redirect without a Referer?

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.

How do I remove Referer?

Can be disabled via menu Tools > Preferences > Advanced > Network, and uncheck "Send referrer information".

How do I get Referer from HTTP request?

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.

Do all browsers send Referer header?

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.


1 Answers

<a href="redirecturl" rel="noreferrer" id="autoclick">Link</a>
<script>document.getElementById('autoclick').click();</script>
like image 189
bas Avatar answered Nov 01 '22 02:11

bas