Help required - Safari and Google search error
I am hoping that someone on the internets may be wise and benevolent enough to help with a problem I am having with Safari and Google Search. I am currently using Mac OS X Mountain Lion (10.8.4) - every time that I try to do a search using google.com (or search using google in the address bar) I get an ERROR 403 (Forbidden)!!1 message.
Here is a screenshot (and below it is some of the technical data). Does anyone have an idea what the problem may be and how I could fix it? By the way I have had this problem since upgrading to Lion some time ago, and each time that I 'restore' the contents of my Hard Drive onto a new computer it follows me...
Any help would be much appreciated! Thanks, Dion
By the way, I have an idea of what may be causing the problem. It has something to do with the user agent script in Safari. When I enable the developer menu and choose a different user agent script my search results work fine. However, each time that I open a new window, or restart Safari, it reverts back to the old user agent script.
I found this post on OS X Hints which I am going to try! I'll keep you posted!
OK, so the mystery has been solved and resolved! Wonderful!
Here's what I did.
First, enable the Developer menu in Safari - see this post for instructions.
Second, choose a new user agent (in my case I simply wanted Safari). Go to 'Develop', and then 'User Agent' in the drop down menu and choose what you want.
Third, navigate to http://www.whastmyuseragent.com
That will give you the text string for your user agent - since I am using Safari, mine is:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1
Fourth, close Safari and then go to the Finder and choose 'Go' and paste the following ~/Library/Preferences/com.apple.Safari.plist
Right click on that file (com.apple.Safari.plist) and open it in Binary text editor - I use BBedit.
Fifth, find the user agent string in the plist file and replace what you find there with the user agent string you want to use (naturally I used the one above).
Sixth, save your edited file in its original location.
Viola! Launch Safari and you are good to go! I hope that helps! It took me two years to figure this out!