An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Topic Options
#20983 - 03/06/12 08:32 AM Tracking cookies in Safari
artie505 Online


Registered: 08/04/09
Thanks for the suggestion; I'll keep it in mind. (Safari has been quiescent the past coupl'a days, so...)

But don't you harbor any ill feelings towards the tracking cookies that Safari stores in RAM and that can be cleared only by quitting it?/*


NB: This and the following 5 posts were extracted from the thread Safari Web Content crashes as a separate topic. Alternaut


Edited by alternaut (03/08/12 07:08 AM)
Edit Reason: changed title and indicated origin of thread
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#20988 - 03/06/12 12:26 PM Re: Tracking cookies in Safari [Re: artie505]
Kevin M. Dean Offline


Registered: 08/04/09
Loc: Florida
Originally Posted By: artie505
But don't you harbor any ill feelings towards the tracking cookies that Safari stores in RAM and that can be cleared only by quitting it?


Not really, any important ones like forum information expire after a relatively short period of time, so when I return it's a new session anyway.


Edited by alternaut (03/08/12 07:01 AM)
Edit Reason: changed title
_________________________
iMac 2.7 GHz Core i5, 12 GB RAM, OS X 10.9, Int SATA 1 TB, Ext Fire 2 TB / 1 TB / 1 TB / 500 GB / 300 GB
Former MacFixIt Forums member since 11/17/99
www.rhubarbproductions.com

Top
#20990 - 03/06/12 04:03 PM Re: Tracking cookies in Safari [Re: artie505]
Hal Itosis Offline


Registered: 09/03/09
Loc: 10.6.8 (build 10K549)
Originally Posted By: artie505
Thanks for the insight, Kevin, but I prefer to quit Safari periodically, because quitting clears the tracking cookies & caches (that Safari "stores" in RAM) that can't be cleared by any other means of which I'm aware.

Have you ever cleared (or seen) this one?

ls -lhn ~/Library/Caches/Metadata/Safari/History/.tracked\ filenames.plist

defaults read ~/Library/Caches/Metadata/Safari/History/.tracked\ filenames


crazy

/edit: Figured i should probably mention that those two orange lines are actually terminal commands. Running the first one (e.g., via copy/paste) will list a hidden file... if it exists. Doing that much will show us its size (among other things). Running the second command will display its content. Observe that, not only is the file hidden in Finder (via the leading dot in its name), but —for something sitting in a folder named "History" —it typically isn't affected when we clear Safari's history. In fact, i've been told that it even survives a 'Reset Safari...' menu operation. (idunno)

So far (despite posting about it far and wide), i have not learned this file's actual purpose (e.g., does it truly benefit the user?), nor which entity is "in charge" of it. [Apple?, Google? who?]


Edited by alternaut (03/08/12 07:01 AM)
Edit Reason: changed title
_________________________

"Regardless of how Apple corporate wants to portray its products,
 the Mac isn't a machine for the masses any more than red wine is
 the preferred beverage at baseball games.
 :
 So who cares about ubiquity anyway?"
--D. Story

Top
#21002 - 03/08/12 12:49 AM Re: Tracking cookies in Safari [Re: Hal Itosis]
ryck Offline


Registered: 08/04/09
Loc: Okanagan Valley
I used both the Terminal commands.

The first one netted:

-rw-r--r--@ 1 501 501 67K 8 Mar 01:22 /Users/myname/Library/Caches/Metadata/Safari/History/.tracked filenames.plist
firstname-lastnames-imac:~ myname $


But the second one generated a long list that contained information about many places I know I visited (PayPal, my bank, newspapers, et cetera). However there were many more names that clearly were tracking sites (Tribal Fusion, DoubleClick, Quote Media, Google Leads, and so on)

Am I correct to assume that this is simply an historical file and that using something like Cocktail to make it visible and then deleting it is not going to net any real gain - like screwing up the tracking people.


Edited by alternaut (03/08/12 07:00 AM)
Edit Reason: changed title
_________________________
ryck

iMac (Retina 5K, 27", 2017), 3.4 GHz Intel Core i5, 8GB RAM, 2400 MHz DDR4
OS High Sierra 10.13.6
Canon MX710 Printer
Epson Perfection V500 Photo Scanner
Time Machine on 320GB OWC Mercury OTG Pro
Carbon Copy Clone on 500GB OWC Mercury OTG Pro

Top
#21003 - 03/08/12 03:52 AM Re: Tracking cookies in Safari [Re: Hal Itosis]
dkmarsh Offline
Moderator

Registered: 08/04/09
Seems like one of those "dump the folder" situations:

Code:
set theFolder to ((path to library folder from user domain) as Unicode text) & "Caches:Metadata:Safari:History"
tell application "Finder"
	if (exists folder theFolder) then
		display dialog "Are you sure you want to delete the folder 
 \"~/Library/Caches/Metadata/Safari/History\"?
Clicking OK will empty the Trash."
		delete folder theFolder
		empty
	else
		display dialog "Folder doesn't exist."
	end if
end tell

(Note that the above script assumes you're not someone who uses the Trash to store things you're not ready to delete yet!)

It appears that the contents of that folder are written to RAM when Safari is launched, so you need to quit Safari before trashing them or they'll be regenerated along with the folder whenever Safari next wants to write to it.

FWIW, .tracked filenames.plist, as mentioned elsewhere, seems to consist of the URLs of sites which came up as Google search results and were actually visited.


Edited by alternaut (03/08/12 07:00 AM)
Edit Reason: changed title
_________________________

dkmarsh • member, FineTunedMac Co-op Board of Directors

Top
#21004 - 03/08/12 04:10 AM Re: Tracking cookies in Safari [Re: dkmarsh]
dkmarsh Offline
Moderator

Registered: 08/04/09
Originally Posted By: dkmarsh
FWIW, .tracked filenames.plist, as mentioned elsewhere, seems to consist of the URLs of sites which came up as Google search results and were actually visited.

Hmm, seems that on sites using Google Custom Search, the search URL itself is written to .tracked filenames.plist whether you visit any of the links or not.


Edited by alternaut (03/08/12 06:59 AM)
Edit Reason: changed title
_________________________

dkmarsh • member, FineTunedMac Co-op Board of Directors

Top
#21007 - 03/08/12 07:46 AM Re: Tracking cookies in Safari [Re: dkmarsh]
ryck Offline


Registered: 08/04/09
Loc: Okanagan Valley
Originally Posted By: dkmarsh
It appears that the contents of that folder are written to RAM when Safari is launched...

Bear with me...neophyte questions...Would that be why there are so may complete URLs? Are they complete so that, when these addresses are loaded into RAM, there is an immediate connection to the sites?

I note than many of the URLs don't use www after HTTP:// For example:

.a.tribalfusion.
ad.ca.doubleclick
app.quotemedia
googleads.g.doubleclick


Edited by ryck (03/08/12 07:48 AM)
_________________________
ryck

iMac (Retina 5K, 27", 2017), 3.4 GHz Intel Core i5, 8GB RAM, 2400 MHz DDR4
OS High Sierra 10.13.6
Canon MX710 Printer
Epson Perfection V500 Photo Scanner
Time Machine on 320GB OWC Mercury OTG Pro
Carbon Copy Clone on 500GB OWC Mercury OTG Pro

Top
#21013 - 03/08/12 10:10 AM Re: Tracking cookies in Safari [Re: dkmarsh]
Hal Itosis Offline


Registered: 09/03/09
Loc: 10.6.8 (build 10K549)
Originally Posted By: ryck
Am I correct to assume that this is simply an historical file and that using something like Cocktail to make it visible and then deleting it is not going to net any real gain - like screwing up the tracking people.

I don't know what its actual purpose is, but i find it odd that it wants to persist forever (e.g., clearing history and reset safari have no effect usually). Is that intentional (on Apple's part), or a bug in Safari? [i.e., it simply overlooked any need to delete dot files in the History folder, because Apple doesn't create them.]

? idunno.

Also curious is how little info we obtain about it via google (or bing, etc).




Originally Posted By: dkmarsh
FWIW, .tracked filenames.plist, as mentioned elsewhere, seems to consist of the URLs of sites which came up as Google search results and were actually visited.

That's some of it, yes. And i think changing our default search engine from google to something else may have an effect as well. [i have not conducted rigorous experiments or anything.]

But i've also seen certain facebook urls sitting in there (sans any google relationship). ::shrug::

I use a shell script to srm the puppy, which i run every time i quit Safari.


[edit/ NB: avoid running srm on entire folders while using wildcards (especially the asterisk: folder/*). I normally aim it at specific file paths. (it's not crafted as cautiously as regular rm is).]


Edited by Hal Itosis (03/08/12 10:31 AM)

Top
#21022 - 03/09/12 12:35 AM Re: Tracking cookies in Safari [Re: Hal Itosis]
artie505 Online


Registered: 08/04/09
Sorry for being slow to get back to you.

I was unaware of that file until you mentioned it. (It's much easier to read in TextWrangler than in Terminal.)

My file did not list any of the tracking garbage that ryck's listed, possibly because I'm running Ghostery?

My file did list an incomplete compilation of my recent Google searches (none of which were "Advanced" searches), but it also listed a coupl'a searches of my PayPal history and a coupl'a other searches that were done without Google involvement, which suggests that Google has nothing to do with it.

My file disappeared when I cleared Safari's history and hasn't reappeared after a coupl'a Google searches (including one that was originally listed).

I dunno. confused

Edit: Add link to screenshot.

Edit 2: Interesting sidenote... If I clear Safari's history via Safari > History > Clear History, /Users/artie/Library/Caches/Metadata/Safari/History is cleared of all files, but if I clear it with Cookie (3rd party d/l), all files remain, although Safari > History shows nothing.


Edited by artie505 (03/09/12 02:17 AM)
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top

Moderator:  alternaut, dianne, MacManiac