The most popular browser among Mac users is Safari. Due to several reasons, Safari browser will hang, redirect to unwanted sites.
I googled it and find some methods to resolve the issue.
Method 1 :Reset Safari from command line
To delete your old Safari settings open the terminal and enter the following commands:
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
Method 2: Reset your Safari browser manually
Once you Reset your browser everything within the browser gets deleted. Suppose if your browser contains so many contents it takes huge time for resetting.
- Open the Safari browser.
- To pull down the menu “click Safari” on the top left corner of the browser.
- Click on “Reset Safari” option.
The popup menu appears with a list of options.
- Clear history
- Reset Top sites
- Remove all webpage preview images
- Empty cache
- Clear the Downloads window
- Remove all cookies
- Remove saved names and icons
- Remove other autofill form text
- Clear all Safari windows
- Reset Safari browser all location warnings
- Choose the relevant option to reset your browser
- Click Reset button.
Method 3: Just remove site history
If you find any problem within one website, you can remove data on-site basis.
Step to remove data on site basis
- Go to privacy section of Safari’s preferences.
- Under “Remove all website data” click Details button.
- Delete your site from the list.
Method 4: To delete configuration folder
Launch the Go menu in OS X Finder
- Clasp the option key and choose the library option that appears.
- Move the Safari folder to your desktop.
Method 5: To delete window state
- Navigate Library > saved application state folder
- Locate “com.apple.Safari.savedState” folder.
- Move the folder to the trash.
Method 6: To delete application caches
- Launch Library > Caches folder
- Find each folder that starts with “com.apple.Safari”
- Move the folder to the trash.
Method 7: To delete cookies configuration
- Launch Library > Cookies folder
- Delete the file “com.apple.Safari.SafeBrowsing.binarycookies”.
Method 8: To delete Preferences
- Launch Library > preference folder
- Delete any file starts with the extension “com.apple.Safari”.
Method 9: To delete User Plug -ins
- Visit Library > Internet Plug-ins folder
- Take over all items to your desktop
Method 10: To delete Global Plug -ins
- Visit Macintosh > HD >Internet Plug-ins folder.
- Except the following Plug-ins replace all items out of this folder.