4

I need to navigate a site that makes use of javascript that checks for user agent and only permits IE9.0 (don't ask). I am using safari and can set IE 9 in the user agent submenu of the develop menu. However, when the site directs me to another page in its collection, an exception is thrown because the new page sees I am using Safari. Reseting the user agent in the develop menu does not work because the page reloads as a safari user agent. Yes I edited the com.apple.Safari plist to include the following item:

Key:    CustomUserAgent
class:  String
value:  Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)

But safari deletes that entry every time it opens a new tab/window and reverts to default! The plist reverts back to 'normal'.

Is there a way to make this change permanent?

1
  • I wanted to thank you and compliment you on your uses of quote-backslash-quote which is the only way this worked. Commented Oct 4, 2014 at 20:51

1 Answer 1

3

You can set it with defaults write:

defaults write com.apple.Safari CustomUserAgent "\"useragentstring\""
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .