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

Custom User Agent in Safari 3.0.4

Is there a way to set a custom user agent in Safari 3? In the debug menu it only gives a list. Can I edit a PLIST file somewhere?

Anyway I'm doing this to fool sites into thinking I have Chrome so I'm not biased against.

iMac6,1 (Late 2006 iMac Intel), 4 GB RAM, 2.33 GHz Processor, 250 GB internal HD, Mac OS X (10.5), Minor GUI mods, external and internal iSight cameras :D

Posted on Oct 17, 2010 7:14 PM

Reply
15 replies

Oct 23, 2010 7:59 AM in response to andyBall_uk

For some reason editing the file didn't do anything. I replaced Safari 2.0.4 with Chrome and selected it in debug menu, but it didn't work... The other user agents work, though (I tested using a site with Mac IE), but Chrome isn't on there.

Man I wish I had Safari 5. I would use FireFox (because S3 is outdated) but it doesn't have all of the features I want.

Message was edited by: Mac OS 9000

Oct 25, 2010 1:08 AM in response to Mac OS 9000

After you edited in the Chrome UA string, did you make sure you loaded a new page? In Safari 5 (sorry, not running S3) if you reload the page (cmd-r, or reload button) it bypasses the cache instead of giving you the same page. Alternately, you could empty the cache (in S5 cmd-opt-E or Safari pull-down menu) before you load the page, to be sure it's a fresh version.

I'm very familiar with Firefox, could be there are extensions/add-ons that would get you the functionality you seek. You can email me if you want more space to type.
Good luck, Wil

Oct 25, 2010 1:48 AM in response to Wilzard

At the risk of further insulting your intelligence, when you edited the chrome string, did you also try creating another string that you know works? I ask because it's possible that you might have to import any additions to the list of UAs, rather than editing the existing plist.
In earlier versions of Firefox, it was necessary to /import/ files written in a particular format, editing a string would not work.

Nov 3, 2010 8:25 PM in response to Wilzard

Answering all questions:

I'm stuck at Safari 3 because I'm stuck at 10.5 (due to a freak glitch that neither Apple nor people on this forum could figure out).

I did load a new page and went to the site that tells me what my UA is. I also relaunched Safari and cleared the cache.

What I did was I modified a UA string that already worked (Firefox) and was on the list. I replaced the UA with the Chrome UA. I also tried making a NEW string. Neither worked.

I know how to change the UA in Firefox, but I want to make it Chrome in Safari 3 because I like Safari better (it has activity, debug menu, OS integration, etc).

I also tried downloading someone else's custom UA PLIST, which didn't have any effect. In fact, the file was originally missing once I reinstalled Safari (my old Safari had the file but it was buggy so I reinstalled).

Message was edited by: Mac OS 9000

Nov 3, 2010 8:51 PM in response to Mac OS 9000

What string? - I'll try it with a multisafari 3.2.1 (closest I got)

If you copy that string, and paste it into the 'other...' UA box - the page should refresh immediately w.o user action & reflect the new string at http://whatsmyuseragent.com/ for example. It doesn't persist in other windows or tabs or after quitting.



Assuming that works - what exactly differs when the same UA string is picked from the list, after modding the plist ?

Nov 3, 2010 10:43 PM in response to andyBall_uk

Oh, sorry, let me clarify. There is not a custom user agent option in Safari 3 (it was implied in my original post but unclear).

And I have news, the Useragent.plist file does NOT exist in Safari 3. I have no idea why it was there originally. I reset, Appzapped, and reinstalled Safari (which fixed the other bugs).

So does anyone know where the user agent is defined so I can change it? Remember, I'm using Safari 3.0.4 here.

Message was edited by: Mac OS 9000

Nov 3, 2010 11:29 PM in response to Mac OS 9000

I'm puzzled, since afaik it was in Safari 3 & definitely IS in Safari 3.1.2 for Leopard which came with 10.5.4 Presumably you're stuck pre 10.5.4 when it didn't exist, or aren't looking in /Applications/Safari.app/Contents/Resources/

If it's not there, then search within the app or other bundled files. I'd look, but don't have one that old.

---

** edit ** ok, found one - it is in the app... work with a copy & keep the string length identical.
How did you have a UA plist in the first place? 🙂

Message was edited by: andyBall_uk

Nov 4, 2010 5:12 PM in response to Mac OS 9000

Hi

Yes, I remember reading of your problems, just thought it was later than 10.5. anyway, now I recall the version properly (sorry to confuse things before) - yep, you have to modify the app directly, short of finding an old add-on that may well do the same thing.

I forget right now if that required re-signing the app, but it's easy enough should you need to.


You might usefully try a multisafari 3.1.x or later, since if it works, you will have the plist & custom US field to play with. They're easy drag-drop installs complete with appropriate webkit frameworks bundled inside. I do suggest backing up bookmarks.plist & the com.apple.safari.plist (don't bother with that one if you run default settings)... just in case things go awry, although I've never known it.

Nov 5, 2010 12:36 AM in response to Mac OS 9000

Cool 🙂

I didn't explain very well, maybe - after seeing a copy of 3.0.4 I do remember it, and editing the app is what was needed then to get a new user agent, same as 2.x & earlier. Not a huge deal, but multisafari is so much easier for what you want.


The 3.0.4 strings are all inside /Applications/Safari.app/Contents/MacOS/Safari rather than a handy (ish) plist file.

Custom User Agent in Safari 3.0.4

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