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

Reset Safari Settings/Preferences

OSX Lion and Safari 5.1.7. I use Outlook Web Access to connect to my work email. I've done something and now I can no longer login to OWA. By this I mean, the username/password box never loads. It was working fine and not sure what I've done, but it doesn't work now. I have installed some plug-ins, but I'm not 100% sure when it stopped working. I have removed all of the plug-ins and it still doesn't work. I have also used the "RESET SAFARI" under Safari menu, and no change.


In installed Firefox and it works fine. I then created a new user on the same machine and Safari works fine, so, it is deffinetly something I've done, and not sure what. Can I (and how) rebuild Safari on one user with this new one I created since it seems to be working fine? Any other ideas?


Thanks

-J

MacBook Air (13-inch, Mid 2012), Mac OS X (10.7.4)

Posted on Jul 11, 2012 12:42 PM

Reply
9 replies

Mar 17, 2017 11:24 AM in response to Neville Hillyer

Hi Neville, Thanks for the wonderful command sequence to cleanup Safari. I have been looking for something like this to help reset Safari. For the last few months since upgrading to Sierra, I find the system suddenly and randomly crawl. Activity monitor shows high CPU for "kernel task". After reading and trying various things (PRAM/NVRAM reset include), I noticed if I closed Safari the system would instantly recover. I have verified this a zillion times. So clearly something has gone wrong with Safari settings. My question - if I execute the above steps, will Safari lose all cached passwords ?

Jul 11, 2012 12:55 PM in response to jhndeere2

The trouble is Safari has so many files all over the place.


First export bookmarks then quit Safari.


Open Terminal - in Utilities and paste the following - make sure it is the same as here - particularly first and last characters - then hit return - it will save your Safari folder with a date stamp on your Desktop and delete several files.



mv ~/Library/Safari ~/Desktop/Safari-`date +%Y%m%d%H%M%S`; \

rm -Rf ~/Library/Caches/Apple\ -\ Safari\ -\ Safari\ Extensions\ Gallery; \

rm -Rf ~/Library/Caches/Metadata/Safari; \

rm -Rf ~/Library/Caches/com.apple.Safari; \

rm -Rf ~/Library/Caches/com.apple.WebKit.PluginProcess; \

rm -Rf ~/Library/Cookies/Cookies.binarycookies; \

rm -Rf ~/Library/Preferences/Apple\ -\ Safari\ -\ Safari\ Extensions\ Gallery; \

rm -Rf ~/Library/Preferences/com.apple.Safari.LSSharedFileList.plist; \

rm -Rf ~/Library/Preferences/com.apple.Safari.RSS.plist; \

rm -Rf ~/Library/Preferences/com.apple.Safari.plist; \

rm -Rf ~/Library/Preferences/com.apple.WebFoundation.plist; \

rm -Rf ~/Library/Preferences/com.apple.WebKit.PluginHost.plist; \

rm -Rf ~/Library/Preferences/com.apple.WebKit.PluginProcess.plist; \

rm -Rf ~/Library/PubSub/Database; \

rm -Rf ~/Library/Saved\ Application\ State/com.apple.Safari.savedState

Jul 11, 2012 1:00 PM in response to jhndeere2

From your Safari menu bar top of your screen click Safari > Preferences then select the Privacy tab.


Click: Remove All Website Data


Quit then relaunch Safari.


If that didn't help, open the Finder. From the Finder menu bar click Go > Go to Folder


Type this exactly as you see it here:


~/Library/Cookies


Click Go


Move the Cookies.binarycookies file from the Cookies folder to the Trash.


Disable the Lion resume feature...


Open System Preferences > General


Deselect: Restore windows when quitting and re-opening apps


Quit then relaunch Safari to test.

Jul 11, 2012 1:32 PM in response to jhndeere2

This script has been developed to work on several OSs and I test it from time to time but I always welcome feedback.


Recently it failed to remove all my bookmarks - I must test this again.


I have slight doubts about password retention after its use and would particularly welcome any feedback on this issue.


Don't forget to reset all your Safari preferences and import your bookmarks.

Reset Safari Settings/Preferences

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