There are three things you can try alone or simultaneously to make browsing in Safari fairly private that, while not making you untraceable on the web, will keep most places from tracking you.
Try these and see how they work for you. They can break some web sites functionality so experiment and see. They're all very easily undone if something goes wrong.
A. Lock The Cache
1. Quit Safari.
2. Head to Macintosh HD > Users > YOURACCOUNT > Library > Caches > com.apple.safari
Inside this folder you'll see "Cache.db".
3. Delete Cache.db (highlight it and hit COMMAND + DELETE, then Empty your trash with SHIFT + OPTION + COMMAND + DELETE).
4. Restart Safari.
5. Look in the com.apple.safari folder for a newly created Cache.db file. It should be about 25 KB in size if empty. Get Info on it (highlight it and hit COMMAND + I) and check the "Locked" check box then close the Get Info window.
Safari will no longer store anything in it's cache.
To Undo this just unlock Cache.db. But quit Safari before you unlock it so Safari doesn't get confused.
B. Lock Local Storage
Think of the LocalStorage folder as a folder full of web cookies. They're essentially the same thing and can potentially track your movements on the web similarly to cookies.
1. Quit Safari.
2. Head to Macintosh HD > Users > YOURACCOUNT > Library > Safari
3. In this folder you'll see a folder called "LocalStorage". Empty it, delete anything and everything within it.
4. Like locking the Cache.db file above, Get Info on the LocalStorage folder itself and check the Locked checkbox.
5. Relaunch Safari.
Safari will no longer store LocalStorage cookies.
C. Keep A Fresh Copy of A Clean Cookie File
Cookies store identifiable information and some persist for years. Unfortunately without cookies enabled many many sites simply won't work. Blame advertisers.
So we need to allow cookies generally but here's a slightly complex way to keep them from tracking you for any length of time you don't deem appropriate.
1. Write down all the passwords for sites you regularly visit on some paper or in a TextEdit document (don't save it if you're worried about security, just work with an unsaved document). This step is important.
2. Quit Safari.
3. Head to Macintosh > Users > YOURACCOUNT > Library > Cookies
In here you'll see "Cookies.plist". This is where all your cookies are stored from sites you like and trust to useless advertisers.
4. For a safety backup, Right-Click on Cookies.plist and select "Compress Cookies.plist". This will create a .zip compressed file of your cookies that you can easily restore if something goes wrong, right there conveniently in the Cookies folder. To keep things tidy rename it something like "Cookies.plist_ORIGINAL" or something so you'll know later on this is your original Cookies file with zillions of junk cookies in it and your old settings and account info.
Looking at a command line tool called fs_usage I've seen Safari touch this zip file from time to time. I'm not sure it's looking in the contents of this file but if you're concerned that Safari can look inside the .zip file just move it to a different location.
Alternatively you can password protect the .zip file. This isn't a one-click procedure but requires use of the command line in the Terminal but it's not terribly difficult at all but I'll post about compressed zip files later or you can search for it.
5. Trash the actual Cookies.plist folder. Empty the trash.
6. Launch Safari.
7. Now, methodically, go to every website you like and log-in and configure them. It's likely you'll be a little surprised just how different websites and accounts and prefs at sites are without cookies.
The trick here is to just go to sites you regularly visit. Mainly ones that require log-ins or you've configured. Don't go to any sites that don't apply. We're building a clean Cookies.plist file here.
8. Once you're done Right-Click on your new clean Cookies.plist file and Compress it. Rename it something like "Cookies.plist_CLEAN" and keep it there or someplace you'll remember.
9. Now that you have a clean cookies file all you ever need to do when you want to eliminate cookies that you don't want and just use cookies that you do want is Quit Safari, go to this folder, Trash and Empty trash on Cookies.plist, then double click Cookies.plist_clean.zip and you're good to go.
Pro Tip: Go to Safari's preferences and look at your cookies under the Privacy tab to see how many cookies you have, where they are from and other things anytime along this process. You'll maybe be shocked by how many cookies you have and to which sites they belong.
BONUS TRACKING TIP:
Safari likes to keep previews of webpages you've visited. Previews, as in saved images of the sites. It's where Top Sites and visual history get their images from rather than pulling them from the web all the time. It's a process called Safari Webpage Preview Fetcher and there's a post on it here.
If you turn off Top Sites in Safari's prefs it usually stops part of the process and saves some CPU but visual history still can save images of sites you go to. Ya know, sites like your bank account, your email, things like that.
Head to Macintosh HD > Users > YOURACCOUNT > Library > Caches > com.apple.safari
Now in here look for a folder called "Webpage Previews".
As before, Get Info on it and Lock it.
Test all of this out to see if it impacts your web browsing. So far the only negative to all of this is slightly slower load times on sites because Safari doesn't cache anything and pulls a full, complete fresh web site every time but it's nothing I really notice.
Give these suggestions a try and see how they work for you and remember that each is easily undone if something isn't to your liking.
No comments:
Post a Comment