3

Using the defaults write com.apple.Safari CustomUserAgent "\"My user agent string\"" command, you can set the default User Agent for Safari. This means that the CustomUserAgent key gets written in ~/Library/Preferences/com.apple.Safari.plist.

<key>CustomUserAgent</key>
<string>My user agent string</string>

But how can you reverse this action? (Manually deleting the two rows from the plist doesn’t work, as they just get rewritten when Safari restarts.)

3
defaults delete com.apple.Safari CustomUserAgent

You must log in to answer this question.

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