Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to not send a referrer from a link in html

Tags:

html

php

I think I saw someday a way to create a link without sending the page that the user was in originally. Is that possible? Or do we need to use a redirector to hide the location of the previous site?

EDIT: If you have an idea for a server-side option to anonymise the link you're welcome.

like image 570
LuRsT Avatar asked May 25 '09 11:05

LuRsT


People also ask

Does browser always send Referer?

This will not work, because browsers don't treat these pages as normal web resources and thus they do not automatically send the "Referer" header when you submit a form.

Does iframe send referrer?

Referrer. When loading an iframe, the browser sends it important information about who is loading it in the Referer header (notice the single r , a typo we must live with).


1 Answers

<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 elements. This keyword does not create a hyperlink, but annotates any other hyperlinks created by the element (the implied hyperlink, if no other keywords create one).

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

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

like image 200
Becheru Petru-Ioan Avatar answered Oct 11 '22 09:10

Becheru Petru-Ioan