Reputation: 3207
I'm writing a page that has links to some music files on another server which has blocked access on external referrers. This website also allows direct access to files (by pasting url in browser's address bar).
After hours of searching and trying, I was going to give up but I something shocking happened! When you send the link via Gmail, by clicking on it Gmail redirects you to another page and then file starts downloading. I mean Gmail is redirecting without any referrers set. How can I do that in my code?
tl; dr: When users click on a link I want to redirect user to an external url without sending any referrer data!
Upvotes: 1
Views: 551
Reputation: 6687
Unfortunately, this inconsistently implemented.
As noted here
window.location.href
under the following browsers:
window.location.href
You may consider clicking it through an <iframe>
but you'll still see different results on various browsers.
Another suggestion would be to proxy the request through your server don't set the referrer when doing the request. This could be an issue if you have limited bandwidth.
Upvotes: 1