I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
I got so sick of seeing all the tracking stuff stashed in /Users/artie/Library/Caches/com.apple.Safari/Cache.db that I locked it, but I still see the same tracking stuff listed in Safari > Prefs > Privacy > Cookies and other website data > Details.
Can anybody explain what's up with that, i.e. from where is "Privacy" picking those items up, and are they functional?
Thanks.
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
|
|
Re: I locked Safari's cache... Or did I?
|
|
Joined: Sep 2009
|
I got so sick of seeing all the tracking stuff stashed in /Users/artie/Library/Caches/com.apple.Safari/Cache.db that I locked it, but I still see the same tracking stuff listed in Safari > Prefs > Privacy > Cookies and other website data > Details.
Can anybody explain what's up with that, i.e. from where is "Privacy" picking those items up, and are they functional? Stuff? How about some concrete examples of stuff? Note: i don't know why Apple displays cached items within the cookie list (i think it's dumb to treat users like dummies). They should put tabs there to segregate cookies from all that “other website data†: local storage, cache and those so-called plug-in items (from your other thread). But i suggest emptying the cache (⌘⌥E) before even looking at that list. BTW (just a guess, but), maybe locking that Cache.db file forces Safari to use more RAM.
Last edited by Hal Itosis; 01/13/12 03:50 PM.
|
|
Re: I locked Safari's cache... Or did I?
|
|
Joined: Sep 2009
|
FWIW, here is my Cookie Counter pipeline command:
sed 's/[[:cntrl:]]//g' ~/Library/Cookies/Cookies.plist |
awk -F. '/Domain/ { getline; print $(NF-1) "." $NF }' |
sed 's/<[^<]*>//g' |sort -b -d -f -i |uniq -c |
awk -v tot=0 '{ tot += $1; print $0 }
END { print(" === =====================\n",
tot, "cookies in", NR, "domains") }' |
pr -3 -t -i100 -o1 -w96
Just paste that code into a text file named cc, make it executable ( chmod a+x) and put it in your $PATH somewhere. Then simply typing cc in Terminal will display a true cookie count. [ note: terminal window must be at least 96-chars wide to avoid wrapping, and even then, domain names longer than 26-chars will be truncated. E.g., facebookapplicationdevelopment.org will be printed as facebookapplicationdevelop.] One could also copy/paste that text directly into Terminal... but it's much easier to save as a file and then just type cc[either way, that pipeline is totally "safe" in that it only reads stuff... i.e., no data anywhere is altered one bit.]
Last edited by Hal Itosis; 01/13/12 04:07 PM.
|
|
Re: I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
I got so sick of seeing all the tracking stuff stashed in /Users/artie/Library/Caches/com.apple.Safari/Cache.db that I locked it, but I still see the same tracking stuff listed in Safari > Prefs > Privacy > Cookies and other website data > Details.
Can anybody explain what's up with that, i.e. from where is "Privacy" picking those items up, and are they functional? Stuff? How about some concrete examples of stuff? By way of example, and all identified as "Cache:" yieldmanager.com typekit.com ru4.com paypalobjects.com media6degrees.com invitemedia.com interclick.com imrworldwide.com gstatic.com googleapis.com googleadservices.com get.it fwix.com bluekai.com as5000.com Note: i don't know why Apple displays cached items within the cookie list (i think it's dumb to treat users like dummies). They should put tabs there to segregate cookies from all that “other website data†: local storage, cache and those so-called plug-in items (from your other thread). I agree with you about Apple's display prefs, which have left us unable to, for instance, delete a Web site's cache items but leave its cookies intact. Further, I don't understand why each Web site's individual cookies are no longer displayed as used to be the case under Safari's "Security" tab. But i suggest emptying the cache (⌘⌥E) before even looking at that list. I do that many times a day, but that kinda introduces cookies into a cache thread and gets away from my original question... From where is "Privacy" picking up those supposedly blocked caches, and are they functional despite my having locked my cache file? (If they are, isn't the lock not only useless, but causing slower page loading times as well?) BTW (just a guess, but), maybe locking that Cache.db file forces Safari to use more RAM. You're suggesting that as a result of my having locked my cache file Safari is storing cache items in RAM?
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
|
|
Re: I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
FWIW, here is my Cookie Counter pipeline command:
sed 's/[[:cntrl:]]//g' ~/Library/Cookies/Cookies.plist |
awk -F. '/Domain/ { getline; print $(NF-1) "." $NF }' |
sed 's/<[^<]*>//g' |sort -b -d -f -i |uniq -c |
awk -v tot=0 '{ tot += $1; print $0 }
END { print(" === =====================\n",
tot, "cookies in", NR, "domains") }' |
pr -3 -t -i100 -o1 -w96
Just paste that code into a text file named cc, make it executable ( chmod a+x) and put it in your $PATH somewhere. Then simply typing cc in Terminal will display a true cookie count. [ note: terminal window must be at least 96-chars wide to avoid wrapping, and even then, domain names longer than 26-chars will be truncated. E.g., facebookapplicationdevelopment.org will be printed as facebookapplicationdevelop.] One could also copy/paste that text directly into Terminal... but it's much easier to save as a file and then just type cc[either way, that pipeline is totally "safe" in that it only reads stuff... i.e., no data anywhere is altered one bit.] Thanks for that, but what am I doing wrong? Last login: Sat Jan 14 02:30:26 on ttys000
Artie-s-Computer-4:~ artie$ chmod a+x /Users/artie/Desktop/cc.txt
Artie-s-Computer-4:~ artie$ and "cc" is still not executable. And I'm afraid that " $PATH" is a bit beyond my experience; does it mean /bin? (I'm prepping to start another thread that deals with cookies and will get into the "guts" of your command, but don't hold your breath.)
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
|
|
Re: I locked Safari's cache... Or did I?
|
|
Joined: Sep 2009
|
Thanks for that, but what am I doing wrong? Last login: Sat Jan 14 02:30:26 on ttys000
Artie-s-Computer-4:~ artie$ chmod a+x /Users/artie/Desktop/cc.txt
Artie-s-Computer-4:~ artie$ and "cc" is still not executable. Well —due to that .txt extension —cc doesn't exist (but cc.txt does). So if you type the full path ~/Desktop/cc.txt then it will execute. Better yet, remove (not just hide) the extension completely. And I'm afraid that "$PATH" is a bit beyond my experience; does it mean /bin? Yes, /bin is typically always part of $PATH. That's why we can simply type ls instead of needing to type /bin/ls every time. Rather than tapping out all the details on my iPad, i offer this link: http://hayne.net/MacDev/Notes/unixFAQ.htmlEdit: note that users should not place custom shell scripts in /bin but rather into /usr/local/bin (or, create their own ~/bin folder) and then modify $PATH accordingly.
Last edited by Hal Itosis; 01/14/12 02:36 PM.
|
|
Re: I locked Safari's cache... Or did I?
|
|
Joined: Sep 2009
|
By way of example, and all identified as "Cache:"
yieldmanager.com typekit.com ru4.com paypalobjects.com media6degrees.com invitemedia.com interclick.com imrworldwide.com gstatic.com googleapis.com googleadservices.com get.it fwix.com bluekai.com as5000.com
You're suggesting that as a result of my having locked my cache file Safari is storing cache items in RAM? Haven't actually tested... but did that locked cache.db file remain locked and unmodified? Or did Safari simply unlock and modify it? If it was still locked and unmodified, then Safari must be fabricating that mixed list from items stored somewhere (and RAM seemed like a logical guess).
Last edited by Hal Itosis; 01/14/12 02:39 PM.
|
|
Re: I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
Thanks for that, but what am I doing wrong? Last login: Sat Jan 14 02:30:26 on ttys000
Artie-s-Computer-4:~ artie$ chmod a+x /Users/artie/Desktop/cc.txt
Artie-s-Computer-4:~ artie$ and "cc" is still not executable. Well —due to that .txt extension —cc doesn't exist (but cc.txt does). So if you type the full path ~/Desktop/cc.txt then it will execute. Better yet, remove (not just hide) the extension completely. And I'm afraid that "$PATH" is a bit beyond my experience; does it mean /bin? Yes, /bin is typically always part of $PATH. That's why we can simply type ls instead of needing to type /bin/ls every time. Rather than tapping out all the details on my iPad, i offer this link: http://hayne.net/MacDev/Notes/unixFAQ.html Got it! Many thanks. The .txt icon changed to a Unix executable icon as soon as I removed the .txt; did I still have to chmod? (I don't follow So if you type the full path ~/Desktop/cc.txt then it will execute. Isn't that what I did when it wouldn't execute?)
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
|
|
Re: I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
> Edit: note that users should not place custom shell scripts in /bin but rather into /usr/local/bin (or, create their own ~/bin folder) and then modify $PATH accordingly.
So I should remove cc from /bin, where I've already placed it?
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
|
|
Re: I locked Safari's cache... Or did I?
|
|
Joined: Sep 2009
|
The .txt icon changed to a Unix executable icon as soon as I removed the .txt; did I still have to chmod? no, the original chmod you did still holds true. (I don't follow So if you type the full path ~/Desktop/cc.txt then it will execute. Isn't that what I did when it wouldn't execute?) I don't see anywhere where you actually tried to execute the cc command. chmod only sets the x bits... it doesn't run the file.
|
|
Re: I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
By way of example, and all identified as "Cache:"
yieldmanager.com typekit.com ru4.com paypalobjects.com media6degrees.com invitemedia.com interclick.com imrworldwide.com gstatic.com googleapis.com googleadservices.com get.it fwix.com bluekai.com as5000.com
You're suggesting that as a result of my having locked my cache file Safari is storing cache items in RAM? Haven't actually tested... but did that locked cache.db file remain locked and unmodified? Or did Safari simply unlock and modify it? If it was still locked and unmodified, then Safari must be fabricating that mixed list from items stored somewhere (and RAM seemed like a logical guess). Yep! /Users/artie/Library/Caches/com.apple.Safari remained locked, and Cache.db remained unmodified, so RAM was a pretty good guess (particularly since Safari does the same thing with cookies...my "somewhere over the rainbow" 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
|
|
Re: I locked Safari's cache... Or did I?
|
|
Joined: Sep 2009
|
> Edit: note that users should not place custom shell scripts in /bin but rather into /usr/local/bin (or, create their own ~/bin folder) and then modify $PATH accordingly.
So I should remove cc from /bin, where I've already placed it? No biggie... just be aware that /bin is Apple's domain, and any given update might erase cc from that folder.
|
|
Re: I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
(I don't follow So if you type the full path ~/Desktop/cc.txt then it will execute. Isn't that what I did when it wouldn't execute?) I don't see anywhere where you actually tried to execute the cc command. chmod only sets the x bits... it doesn't run the file. I misunderstood you...thought you said to type the full path in the chmod command (which I had done). I know chmod doesn't run the file, but how would I execute the cc command when it's still in .txt form? (I tried dragging the file into a Terminal window and hitting "Return, but with no luck.")
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
|
|
Re: I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
> Edit: note that users should not place custom shell scripts in /bin but rather into /usr/local/bin (or, create their own ~/bin folder) and then modify $PATH accordingly.
So I should remove cc from /bin, where I've already placed it? No biggie... just be aware that /bin is Apple's domain, and any given update might erase cc from that folder. In that case, I'd prefer to store cc in ~, but I'm not certain what "modify $PATH accordingly" means. (Does it mean that my cc command must be ~/bin/cc rather than just cc?) Thanks.
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
|
|
Re: I locked Safari's cache... Or did I?
|
|
Joined: Sep 2009
|
I know chmod doesn't run the file, but how would I execute the cc command when it's still in .txt form? (I tried dragging the file into a Terminal window and hitting "Return, but with no luck.") Instead of telling us about it, showing us the actual terminal text is much preferred. I have a strange feeling that terminal didn't reply with " no luck". At this point (wherever cc is), a listing with ls -l would be useful (to see if it still has x bits or not). ls -l /path/to/cc
In that case, I'd prefer to store cc in ~, but I'm not certain what "modify $PATH accordingly" means. (Does it mean that my cc command must be ~/bin/cc rather than just cc?) Ideally, we would modify your $PATH variable so you'd only need to type cc As yet unknown is which of the various startup files your bash shell is already using. This is complicated because there are many possibilities. [e.g., i prefer to set my $PATH in a file called ~/.bashrc] If you show us this, we can see what your setup is: cd; ls -1 .bash*
But perhaps (without even knowing which startup files you use), this has the best chance of succeeding: echo 'declare -x PATH=$PATH:~/bin' >> ~/.bash_profile
...after which, (quit and relaunch terminal) and look at: echo "$PATH"
and /Users/artie/bin should be at the end there. [don't forget to actually create the ~/bin folder and put cc inside it.]
Last edited by Hal Itosis; 01/14/12 04:39 PM. Reason: oops ; changed > to >> and changed soft quotes to hard quotes
|
|
Re: I locked Safari's cache... Or did I?
|
|
Joined: Sep 2009
|
rats --- i had to edit that previous message twice.
seems i got there in time.
|
|
Re: I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
I know chmod doesn't run the file, but how would I execute the cc command when it's still in .txt form? (I tried dragging the file into a Terminal window and hitting "Return, but with no luck.") Instead of telling us about it, showing us the actual terminal text is much preferred. I have a strange feeling that terminal didn't reply with " no luck". First (before I forget again), thanks for the Hayne of Tintagel link. OK... I guess I managed to confuse myself and tried to run an un-chmodded version of cc.txt, because a chmodded version runs: Last login: Sun Jan 15 01:28:49 on ttys000
Artie-s-Computer-4:~ artie$ /Users/artie/Desktop/cc.txt
-bash: /Users/artie/Desktop/cc.txt: Permission denied
Artie-s-Computer-4:~ artie$ chmod a+x /Users/artie/Desktop/cc.txt
Artie-s-Computer-4:~ artie$ /Users/artie/Desktop/cc.txt
4 ally.com 4 google.com 9 wunderground.com
5 chase.com 12 intuit.com === =====================
13 cnet.com 35 macupdate.com 126 cookies in 11 domains
9 ebay.com 23 paypal.com
3 finetunedmac.com 9 vanguard.com
Artie-s-Computer-4:~ artie$ Sorry about the confusion.
Last edited by artie505; 01/15/12 05:45 AM. Reason: Expand code section
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
|
|
Re: I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
At this point (wherever cc is), a listing with ls -l would be useful (to see if it still has x bits or not). ls -l /path/to/cc In that case, I'd prefer to store cc in ~, but I'm not certain what "modify $PATH accordingly" means. (Does it mean that my cc command must be ~/bin/cc rather than just cc?) Ideally, we would modify your $PATH variable so you'd only need to type cc As yet unknown is which of the various startup files your bash shell is already using. This is complicated because there are many possibilities. [e.g., i prefer to set my $PATH in a file called ~/.bashrc] If you show us this, we can see what your setup is: cd; ls -1 .bash*But perhaps (without even knowing which startup files you use), this has the best chance of succeeding: echo 'declare -x PATH=$PATH:~/bin' >> ~/.bash_profile
...after which, (quit and relaunch terminal) and look at: echo "$PATH"
and /Users/artie/bin should be at the end there. [don't forget to actually create the ~/bin folder and put cc inside it.] Got it! Many thanks for working through this with me and not only enabling me to accomplish something useful, but to learn something useful in the process. Last login: Sun Jan 15 01:52:50 on ttys000
Artie-s-Computer-4:~ artie$ cd; ls -1 .bash*
.bash_history
.bash_profile
Artie-s-Computer-4:~ artie$ echo 'declare -x PATH=$PATH:~/bin' >> ~/.bash_profile
Artie-s-Computer-4:~ artie$ Last login: Sun Jan 15 01:55:40 on ttys000
Artie-s-Computer-4:~ artie$ echo "$PATH"
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/artie/bin:/Users/artie/bin
Artie-s-Computer-4:~ artie$ cc
4 ally.com 4 google.com 9 wunderground.com
5 chase.com 12 intuit.com === =====================
13 cnet.com 35 macupdate.com 126 cookies in 11 domains
9 ebay.com 23 paypal.com
3 finetunedmac.com 9 vanguard.com
Artie-s-Computer-4:~ artie$
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
|
|
Re: I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
rats --- i had to edit that previous message twice.
seems i got there in time. Forgot to mention that you did. Thanks, again.
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
|
|
Re: I locked Safari's cache... Or did I?
|
Joined: Aug 2009
Likes: 15
|
OP
Joined: Aug 2009
Likes: 15 |
Getting back to basics, here, I've now unlocked my cache, because the lock wasn't stoping the junk mail but was slowing loading time.
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
|
|
|
|