Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Apple Safari browser 11.0.1

Hi


I am wanting to automate the removal of Safari browser cache on many Macs with Mac OS 10.10 upwards to 10.13.


In terminal in ~/Library/Safari I have deleted the History.db file whilst Safari is open - the History list is not deleted. If I close/reopen Safari the History list is empty.


I understand the hidden file Webpageicons.db stores the URLs' visited so would this need to be deleted too?

Are there are other files in locations I need to delete? I may be right in thinking this data is stored elsewhere and perhaps hidden?

Is there a way to remove the history cache whilst the browser is open?

If I wanted to remove ALL browser cache and not just the History what needs to be deleted?


thanks

MacBook Pro with Retina display, OS X Yosemite (10.10.3), null

Posted on Nov 16, 2017 3:45 AM

Reply
15 replies

Nov 20, 2017 7:47 AM in response to infmac

Open safari take cursor on top menu bar , click on History > show History .

Simultaneously open user library macOS Sierra: Library folder

Click on Caches folder select all contents ( use keys command and A ) delete them command and delete the caches column has zero contents , you can see in the screen shot just dragged both windows side by side , the browsing history is still there .

User uploaded file

But a moment caches content will start to rebuild again and as these are temporarily files and will again create .

User uploaded file

Nov 20, 2017 9:23 AM in response to infmac

In your question you asked -

Is there a way to remove the history cache whilst the browser is open?

If I wanted to remove ALL browser cache and not just the History what needs to be deleted?

Answered for that was as above - browser caches are stored in user library - Caches folder so delete them but your history is still intact .


Now , a different question how to delete the history and store website data that is in the form of cookies .

Take cursor on top menu bar > History > hold option key - in the column you will see clear History and keep website data click on it a pop - up window appears .

User uploaded file

Click on clear History , this will clear all of your browsed history but save the website data .

Nov 16, 2017 7:21 AM in response to infmac

Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J. When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder. Select Library/Caches/com.apple.Safari/Cache.db and move it to the trash.

Nov 20, 2017 2:47 AM in response to Eric Root

Deleting Cache.db from Library/Caches/com.apple.Safari/Cache.db has not worked. The file gets removed and when you close and then open Safair the history of URLS' are still there.


I tried deleting the whole folder, Library/Caches/com.apple.Safari but this made no difference.


Can someone else explain what is going on?


thanks

Nov 20, 2017 7:04 AM in response to Eric Root

Yes of course that will work.


I want to know how to go about automating it to multiple machines and what files/folders need deleting as it appears from my posts above that data does not get removed.


So if someone can explain how Safari works in terms of what data needs removing, if its hidden and in what locations they are in.

Nov 20, 2017 7:19 AM in response to infmac

Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J. When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder. Select Library/Safari. I would delete the history.db, the contents of the Database folder, the contents of the Local Storage folder, and the Webpageicons.db. Then Caches/com.apple.Safari/Cache.db


That should remove most, if not all, history.

Nov 22, 2017 2:25 AM in response to infmac

I have also found locations


~/Library/Safari which has huge amounts of data in it.

~/Library/caches/com.apple.safari which also has much data


Does folder fsCachedData which is at location ~/Library/caches/com.apple.safari also need to be deleted?


If I asked Apple what are the files(s) folder(s) to ensure the browser cache is cleared what is the answer?

Apple Safari browser 11.0.1

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.