[ACCEPTED]-How to not send a referrer from a link in html-html

Accepted answer
Score: 13
<a href="example.com" rel="noreferrer">Example</a>

http://www.w3.org/TR/html5/links.html#link-type-noreferrer The noreferrer keyword may be used with a and area 9 elements. This keyword does not create a 8 hyperlink, but annotates any other hyperlinks 7 created by the element (the implied hyperlink, if 6 no other keywords create one).

It indicates that no referrer information is to be leaked when following the link.

If a user 5 agent follows a link defined by an a or 4 area element that has the noreferrer keyword, the 3 user agent must not include a Referer (sic) HTTP 2 header (or equivalent for other protocols) in 1 the request.

Score: 6

Check out this section on Wiki on referrer hiding.

Most major 5 browsers do not send the referrer header 4 when they are instructed to redirect using 3 the "Refresh" HTTP header. However, this 2 method of redirection is discouraged by 1 the W3C.

Score: 1

There is no way to do this.

In fact this 4 param is controlled on the client side. Depending 3 on the browser, some just never send referer 2 or fakes.

You should not be able to do it 1 in any way.

But here is 2 tips:

  • Use a redirector page
  • Offer to the user a copy/paste function and then, open a new window to let him able to paste and go.
Score: 1

I recommend to using a service like https://anon.click/ Also 2 in HTML5 there is the rel="noreferrer" which 1 could be used.

Score: 1

I use a combination of multiple answers 7 I see here.

<a href='data:text/html;charset=utf-8,<html><head><meta http-equiv="refresh" content="0;url=http://www.google.com/"></head><body><a href="http://www.google.com/" rel=noreferrer>Open Link</a></body></html>' rel=noreferrer target=_blank>A link without referer</a>

I tested with Firefox, Chrome, iOS 6 Safari, and Samsung Android default browser. And 5 it works.

Even if a browser sends a referrer, it 4 will not be the website since the page address 3 is "data:...". That's why it is 2 much safer than creating a page that does 1 this.

Score: 0

Depending on what your circumstances are 6 you could use something like anonym.to - if you trust 5 these services.

From your tag I assume you 4 do not want to use (or have access to) server-side 3 tools like PHP. In that case this will be 2 tricky. I don't know whether this is even 1 possible at all with just HTML/Javascript.

More Related questions