It seems the easiest is the iframe dirty way.
Links that don't pass referrer
-
01-12-2021 - |
Question
I want to create a list of links opening the targets in new tabs from my private page and I don't want the referring URL to be passed on. I tried the following method, but it didn't solve the problem:
<script>
function op(url){
window.open(url.replace(/<(?:.|\n)*?>/gm,''),'_newtab');
}
</script>
<span onclick="javascript:op(this.innerHTML);">http://www.google.com<span>
Is there any way how to spoof or blank the referrer? In the worst case I might create an iframe and put the page with links on some free hosting, but I'd prefer some more elegant solution. The only requirements are tha t it should work in Chrome, Opera, IE and FF (2011+ versions), accessibility is not an issue, since it'll be used by very few users I know.
Solution 5
OTHER TIPS
The referring URL is part of the HTTP protocol, not the mark-up. You can't change this.
Also, you never need to specify javascript:
in an event handler. It's always is and can only be javascript.
There is a rel="noreferrer"
which is not yet suported by Firefox...
Create a tiny app on Heroku that receives a URL then forwards the user.
You could redirect to an intermediate page that redirects to the final website, this would hide the true referer.