How to disable HTTP referrer in Firefox?
In the URL bar of Firefox, go to about:config
.
In the search box of the about:config
page, enter the following:
Network.http.sendRefererHeader
Double click on Network.http.sendRefererHeader
and change the value from 2
to 0
to disable the referrer header.
The following values are accepted:
0 – Disable referrer.
1 – Send the Referer header when clicking on a link, and set document.referrer for the following page.
2 – Send the Referer header when clicking on a link or loading an image (default).
Source
It should be noted that some websites such as google and tumblr include the referrer in the link URL rather than the header.
There is an addon which fixes this problem and removes the redirect from google results but it doesn't seem to work on google images (click here for more info).
There is also a newer option which might be of more interest to you called network.http.referer.XOriginPolicy
. The options you can set for this are:
0 - No restrictions (default).
1 - Base domain must match (send from a.example.com to b.example.com).
2 - Full host name must match (only b.example.com to b.example.com).
Source
There are Firefox Addons that can accomplish this. They tend to make it easy to toggle on/off sending the referrer header, and do not require manual modification of Firefox's configuration. For example,
Smart Referer:
Send referers only when staying on the same domain.
You can whitelist domains with wildcards and configure other things, look in the preferences page of the addon in the addon manager.
https://addons.mozilla.org/en-US/firefox/addon/smart-referer/
Toggle Referrer:
This addon allows a user to toggle referers between 3 states:
Referer 0: Never send the Referer header or set document.referrer
Referer 1: Send the Referer header when clicking on a link, and set document.referrer for the following page
Referer 2: Send the Referer header when clicking on a link or loading an image, and set document.referrer for the following page. (Default)
https://addons.mozilla.org/en-US/firefox/addon/toggle-referer/
You can find even more by searching the Firefox Addons site for "refer" or "referrer".
The Firefox add-on RefControl allows you to set a global Referer behaviour, which can be overwritten for specific domains.
The behaviours are:
- Normal (like Firefox works by default)
- Block (send no Referer at all)
- Replace (sends the root address of the current domain as Referer)
- Specific (allows you to define a string yourself which should be sent as Referer)
For all these behaviours you can enable if they should work for all links or only for links to other domains.
(The last update is from 2014-12, but it still works fine with current Firefox versions.)