Private Browsing with Safari
Sunday, November 15th, 2009I use firefox as my primary browser, both at home and at work. So I have setup my Safari browser, as my private browser – that is sans cache, history, cookies or anything of a similar nature. I noticed that the “Private Browsing” option in Safari, doesn’t do that good a job of not leaving files hanging around in one’s operating system, furthermore unless your careful, Spotlight will eventually end up indexing your browser history, cache, which may be less than ideal.
In order to have a zero cache safari instance on my laptop I have taken the following steps :
- 1: Removed spotlight’s prying eyes, by excluding the following directories :
- /Users/<USERDIR>/Library/Caches
- /Users/<USERDIR>/Library/Safari
- /Library/Caches
- 2: Setup two cronjobs to constantly delete Safari cache-dir
*/10 * * * * find /Users/<USERDIR>/Library/Safari -type f -exec rm {} \; 2>&1 > /dev/null
*/10 * * * * find /Users/<USERDIR>/Library/Caches/Metadata/Safari/ -type f -exec rm {} \; 2>&1 > /dev/null
