/    Sign up×
Community /Pin to ProfileBookmark

how to block or remove http_referer header

After my site users click on a link on my site, can I block or remove the http_referer header from information sent to the destination site? Many are asking to remain anonymous. I tell them that Firefox can be config’ed to not pass the http_referer header (and other environment variables), but almost all don’t use FF, or they aren’t technical enough. 😮

Anyway, is there a way I can do it with my website? ?

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@MrCoderMar 11.2008 — Will javascript window.location refrain from passing the referrer?
Copy linkTweet thisAlerts:
@apeaceMar 11.2008 — Sorry that I do not have time to test this out, but try this:

[code=php]header("Location: http://www.google.com");[/code]

Replace the google URL with the URL you want to redirect to.

I don't know if this will block referrer or not. Could you let us know? I'll try and think up something else if it doesn't work.

As far as turning this into a link, you could just link to something like redirect.php?url=http://www.google.com, and redirect.php could contain something like that up there ^^
Copy linkTweet thisAlerts:
@LeafgreenauthorMar 11.2008 — no, it doesn't work ?
Copy linkTweet thisAlerts:
@TJ111Mar 11.2008 — You can use a <meta> tag refresh, although this will stop search engines spiders from following your outbound links. Alternatively, you could use something like tinyurl.com or snipurl.com for your outbound links, although that requires some extra work.
Copy linkTweet thisAlerts:
@LeafgreenauthorMar 11.2008 — How could a <meta> tag refresh block http_referer?
Copy linkTweet thisAlerts:
@felgallMar 11.2008 — Have you tried actually setting the referer header before setting the location header?
×

Success!

Help @Leafgreen spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...