Skip to content

Instantly share code, notes, and snippets.

@JakobR
Created July 13, 2014 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JakobR/484e5834527af3cfc678 to your computer and use it in GitHub Desktop.
Save JakobR/484e5834527af3cfc678 to your computer and use it in GitHub Desktop.
Link to sites without sending referrer
  1. HTML5: rel="noreferrer" attribute on the link.

     <a href="http://www.example.com/" rel="noreferrer">blah</a>
    
  2. Serve site over https. Browsers don't send the referrer when going from https to http urls.

  3. Use a data uri in the link. The data uri contains a redirect to the actual destination. See this answer.

     <a href='data:text/html;charset=utf-8, <html><script>window.location = "http://google.ca";</script></html>'>Link</a>
    
  4. Redirect with sites like anonym.to or vani.sh... But this is often slow, and another dependency...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment