Skip navigation

How do I clear cache in Safari now?

257844 Views 52 Replies Latest reply: Jan 8, 2014 5:22 AM by OAFCOK RSS
  • freediverx01 Level 1 Level 1 (40 points)
    Currently Being Moderated
    Dec 28, 2012 4:52 AM (in response to Pedro Santos)

    The Safari cache.db file is located in <username>/Library/Caches/com.apple.Safari/

     

    By default, Mountain Lion hides your home directory's Library folder (username/Library). To access it from Finder, you must open the "Go" menu and hold down the Option key to reveal the Library in the menu's drop down list. You can then click on Library in the menu, which will open it in a Finder window.

     

    Once there, open the Caches folder and then the com.apple.Safari folder.

  • Pedro Santos Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 28, 2012 5:07 AM (in response to freediverx01)

    Should I delete the cache.db ? I will test again the option avaliable and see after if the size of the file has decreased. Now is 1,7 MB

  • freediverx01 Level 1 Level 1 (40 points)
    Currently Being Moderated
    Dec 28, 2012 5:26 AM (in response to Pedro Santos)

    I tested this and confirmed that Safari's cache.db file is neither removed nor emptied when the user uses the "reset Safari" function, nor when they select the "empty caches" function in the Develop menu which is hidden by default. Additionally, I opened Safari's Preferences panel, selected the Privacy tab and clicked on the "Remove All Website Data" button. Again, this had no effect on the cache.db file.

     

    The Safari cache.db file is in SQLite format. If you don't have an appplication that can read SQLite files, you can still open it up in TextEdit and confirm that it in fact contains traces of the URLs you have visited.

     

    I performed the same test with Firefox and Chrome and in both those cases, their respective cache.db files were deleted when I used those browsers' "clean history" functions.

     

    At this point I have no idea what steps are truly necessary to remove all Safari web browsing history. If this file remains even after selecting all those Safari privacy functions, god knows where else Safari is storing browsing data without providing users a way to delete of delete it.

  • Pedro Santos Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 28, 2012 5:32 AM (in response to freediverx01)

    Which version you use ?

    I use Version 6.0.2 (8536.26.17)

     

    But you move to the trash that file cache.db?

    I prefer not mess with that.

  • freediverx01 Level 1 Level 1 (40 points)
    Currently Being Moderated
    Dec 28, 2012 5:39 AM (in response to Pedro Santos)

    I have the same version.

     

    I was also concerned about breaking something if I deleted the file. So to test, I first copied the file to my desktop (just in case) and then deleted it from the com.apple.Safari folder. Restarted Safari and it simply re-created the file on its own (with previous browsing data gone of course.)

     

    I believe the purpose of cache files is to save recent data locally in order to imporove an application's performance. I sense that it is generally harmless to remove these files manually though I don't have ny reference to back that up.

     

    The main thing you lose is the same as when using their privacy functions: you might lose passswords and preferences for your differrent websites. But of course, you should already know this.

  • Pedro Santos Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 28, 2012 5:49 AM (in response to freediverx01)

    I think you have somethig wrong in your system.

    I just gone to the file again and now it has 1,5MB and I did not yet empty cache

  • freediverx01 Level 1 Level 1 (40 points)
    Currently Being Moderated
    Dec 28, 2012 6:04 AM (in response to Pedro Santos)

    I just browsed several websites and confirmed my Safari cache.db file is 8.8MB in size. I then cleared browsing data using the three methods I previously mentioned (reset Safari, empty caches, and remove all website data.) I closed my browser and re-checked the cache.db file. It's still 8.8MB.

     

    I don't know why your cache.db file seems to have gotten smaller without you emptying the cache manually, but I don't see that you've proven anything either.

     

    The question at hand is whether Safari removes all traces of web browsing history at the user's request. I tested this as follows:

     

    Step 1: I read the cache.db file and confirmed it contained URLs that were visited

    Step 2: I engaged every known Safari function intended to clear browsing data

    Step 3: I re-checked the cache.db file and confimed that it was neither emptied nor deleted and that it still contains visited URLs.

     

    You can follow these same steps without the perceived risk of deleting any system files (aka, the cache.db file.)

  • Pedro Santos Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 28, 2012 6:37 AM (in response to freediverx01)

    Yes, you are right. I just empty cache and the size of the file is the same.

    Maybe it has some hidden procedure that empty the cache in other way, but you still need to use the option.

    Now my file has 13,9 MB and I believe will go again to a smaller size, when Safari understands it needs.

    If not why I had only 1,7 MB. Yesterday I used Safari a lot

  • freediverx01 Level 1 Level 1 (40 points)
    Currently Being Moderated
    Dec 28, 2012 6:43 AM (in response to Pedro Santos)

    It's quite possible (even likely) that Safari manages the cache as needed, and that this may reduce the size of the file sometimes.

     

    Are you concerned about the cache size specifically?

     

    I'm concerned about privacy and the ability to clear my browsing data when desired. Firefox doesn't seem to have a problem with this. Neither does Chrome.

  • ~Bee Level 7 Level 7 (30,580 points)
    Currently Being Moderated
    Dec 28, 2012 7:27 AM (in response to freediverx01)

    Good sleuthing there, free --

     

    So, what happens if you go to Users > Library > Caches > Safari, and take that Safari file to the trash & restart Safari.  I did a "get info" on mine and it's 233.2 MB.  Took that file to the trash, restarted Safari.

     

    BRB

     

    Cache is now 4 MB, the size of my CNN Home Page.

     

    Then I delete History, and I think I'm pretty good as far as privacy goes.  What do you think?

  • freediverx01 Level 1 Level 1 (40 points)
    Currently Being Moderated
    Dec 28, 2012 7:55 AM (in response to ~Bee)

    Well, yes and no. For starters, I don't want to have to manually delete a file that's burried several layers deep in a hidden folder when this function should be accessible with a single click from a Safari menu.

     

    Additionally, this whole mess raises the question of where else Safari may be storing web data that is not deleted when requested by the user. I am not convinced that Apple takes this issue seriously.

     

    This is like an expensive home security system that requires the resident to go through several door locks while leaving an open window for burglars.

     

    The core issue here is that users want a simple and reliable method for erasing their web browsing data when desired and Apple has failed to deliver.

     

    Anyone who agrees should file a report with Apple at:

     

    http://www.apple.com/feedback/safari.html

  • ~Bee Level 7 Level 7 (30,580 points)
    Currently Being Moderated
    Dec 28, 2012 8:24 AM (in response to freediverx01)

    I agree, but I was glad to find out how to get rid of it finally.  I have made my thoughts on this known, and will contiue to.

  • Vritika Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jan 3, 2013 9:32 AM (in response to ~Bee)

    Hi, I need a bit of help, I can't seem to find com.apple.safari in Cache or anywhere on my mac for that matter.

    I even tried making all files visible and still no luck. I tried Clearing history but that did not clear my cache.

     

    Running Safari 6.0.2

    Please let me know if anyone has any ideas.

    Thanks

    V

  • ~Bee Level 7 Level 7 (30,580 points)
    Currently Being Moderated
    Jan 3, 2013 11:34 AM (in response to Vritika)

    Vritika --

     

    Quit Safari.

     

    Click out on your desktop somewhere to get Finder menu on the top menu bar.  Then look over to the right, and select the "Go" menu while holding down the "Option"button.  You will then see an option for "Library" right under your home folder on that list. 

     

    That is your hidden Users Library.  Open that Library, go down to Caches.  Open that, and then look for apple.com.Safari.  Take that file to the trash.

     

    Restart Safari.

  • SeanWolf.me Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jan 14, 2013 3:01 PM (in response to freediverx01)

    Clearing your Safari browser cache using the "Develop > Empty Caches" selection in the menu does not work. This is a major bug within Safari - Version 6.0.2

     

    To clear your browser cache you must manually remove the Cache.db from your user files.

     

    Follow these steps to clear your browser cache manually:

    1. Open "Finder"
    2. In the menu at the top of your screen select "Go"
    3. While the "Go" menu is dropped down press and hold the "option" key on your keyboard. This will reveal the selection "Library"
    4. Select "Library"
    5. Navigate into the folder "Caches"
    6. Next navigate into the folder "com.apple.Safari"
    7. In this folder you will see a file named "Cache.db"
    8. Right click the "Cache.db" file and select "Move to Trash"
    9. Now restart Safari by right clicking the Safari icon at the bottom of your screen and select "Quit"
    10. You have now successfully cleared your browser cache.
    11. Open Safari and happy browsing :-)

     

    Note: Clearing your browser cache will not remove any saved password, logins or session data. It will just remove the files and images that were cached while browsing within Safari.

    Mac OS X (10.7.5)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (4)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.