MozillaZine

Removing third-party referrers

Discuss various technical topics not related to Mozilla.
Anonymosity
 
Posts: 8474
Joined: May 7th, 2007, 12:07 pm

Post Posted June 19th, 2017, 12:24 pm

Is there any way to use a script to remove third-party referrers from a browser's request headers? There is no extension for Safari that I could find that could do that, so I was looking for a script for Tampermonkey. I was unsuccessful. Can a script not do that? The script would have to deal not only with anchors, but also with links and scripts.

Grumpus

User avatar
 
Posts: 11754
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Post Posted June 20th, 2017, 5:01 am

Spent some time searching yesterday in Google came up with some header editing suggestions
Hard to tell what or which might do the job.
There was one listing on the Apple developers site which seemed to have some instruction but it might not be relative.
Code editing
. . . and didn't know if this would help, there was a cross platform editing package which seems to have disappeared. Started with lower case "webXXXXX"
playing with referer header
Referer spoofing

morat
 
Posts: 2568
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 20th, 2017, 9:25 am

You can change the document.referrer string with Tampermonkey, but not the Referer request header.

You can change the navigator.userAgent string with Tampermonkey, but not the User-Agent request header.

Super User answer
http://superuser.com/a/695049

Anonymosity
 
Posts: 8474
Joined: May 7th, 2007, 12:07 pm

Post Posted June 20th, 2017, 10:33 am

What is the document.referrer string? Where is it? Would spoofing that prevent tracking when I follow links or load images?

morat
 
Posts: 2568
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 20th, 2017, 11:19 am

You can still be tracked using the Referer request header.

document.referrer
http://developer.mozilla.org/en-US/docs ... t/referrer

A script running on a page can consult this property to see the same information that was sent in the Referer request header.

Anonymosity
 
Posts: 8474
Joined: May 7th, 2007, 12:07 pm

Post Posted June 20th, 2017, 11:40 pm

So that is similar to the navigator.userAgent. Javascript can dig it out, but the value in the request header can be different.
I guess there is no code one can use with the Mac Terminal to block anything in the request header for Safari?

morat
 
Posts: 2568
Joined: February 3rd, 2009, 6:29 pm

Post Posted June 21st, 2017, 6:39 am

I think Fiddler can rewrite HTTP on the Mac.

Looking for HTTP debugging proxy for Mac
http://superuser.com/questions/42813
http://en.wikipedia.org/wiki/Fiddler_(software)
http://www.telerik.com/fiddler

Safari API sucks.

How modify the request headers using safari extension
http://stackoverflow.com/questions/29824490

Anonymosity
 
Posts: 8474
Joined: May 7th, 2007, 12:07 pm

Post Posted June 21st, 2017, 11:21 pm

Fiddler sounds like a fancy packet-sniffing proxy from the description. All I want is to block tracking when I use Safari!

Grumpus

User avatar
 
Posts: 11754
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Post Posted June 22nd, 2017, 10:52 am

Just brainstorming, grain of salt time . . .
Would Safari be able to prefetch or preload the page data first, scan and then pick and choose "allow."
Seems like something that might be more involved than a simple script.
You'd then need some form of Data base for comparison and the slightest syntax change might throw the whole thing off.
Even with some form of speedy gonzo system, if you are applying a gonzo system, might it not get overwhelmed?
If you keyed the ips/urls couldn't you just block those, place them in a database? Same problems?

Anonymosity
 
Posts: 8474
Joined: May 7th, 2007, 12:07 pm

Post Posted June 23rd, 2017, 1:53 pm

Instead of just clicking links, I could right-click, choose to copy the location and paste that into the address bar, but that does not help with stopping tracking while picking up images. What is really needed is an extension to remove the third-party referers, but I could not find one, and I did a lot of searches.

Grumpus

User avatar
 
Posts: 11754
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Post Posted June 24th, 2017, 6:01 am

Can you set Safari to accept images only from originating source, would this cut down on some of the third party referrers, at least for the images?

Anonymosity
 
Posts: 8474
Joined: May 7th, 2007, 12:07 pm

Post Posted June 24th, 2017, 11:45 am

I do not want to do that, since some pages use third-party images, and you lose a significant part of the content if you block those. With Safari, I see no way to do that anyway. Preferences are very limited and there is nothing like about:config for Safari.

Return to MozillaZine Tech


Who is online

Users browsing this forum: No registered users and 0 guests