Referer and Referrer-Policy
Referer
This the HTTP request header set by the browser so that the web server then knows from where's the request coming from.
Referrer-Policy
This is the HTTP response header returned by the webpage when it loads. It's then used by browser to decide what value must be set in the referer header for subsequent requests.
For Browsers
These Referrer-Policy headers are used by browsers to then decide what value must be sent in the request.
Referrer policy in HTML
- We can directly set it at HTML level. Then this referrer policy will be used by browser.
- Or in other HTML elements such as a, img, script, link and area.