Skip to content

SafariInstall

cielavenir edited this page May 11, 2015 · 1 revision

SafariInstall

Safari Version

  • 5.1 or later is recommended.

Configuration

  • Safari doesn't allow extensions to modify UserAgent.
  • There are no configuration screens.
  • The value of UserAgent in development menu is used. i.e. there is only browserUA edition.

How to change UA?

  • You need to:
    • Preferences -> Details -> Display "Development" menu
    • 環境設定 -> 詳細 -> 開発メニューを表示
  • Now you can change UserAgents via:
    • Development -> User Agent -> ...
    • 開発 -> ユーザエージェント -> ...
  • cTouch will help to set special properties for better emulation.

How to modify UA default list?

  • It is annoying to set default UA list each time.
  • You can configure:
    • Win: C:\Program Files\Safari\Safari.resources\UserAgents.plist
    • Mac: /Applications/Safari.app/Contents/Resources/UserAgents.plist
  • Syntax (cf: http://safarirealized.com/archives/51496746.html ):
<dict>
	<key>name</key>
	<string>[BrowserName]</string>
	<key>version</key>
	<string>[BrowserVersion]</string>
	<key>platform</key>
	<string>[Platform]</string>
	<key>user-agent</key>
	<string>[string of UA]</string>
</dict>
  • It will be shown as BrowserName BrowserVersion - Platform in menu.
  • Possible example:
<dict>
	<key>name</key>
	<string>Android</string>
	<key>version</key>
	<string>4.0.4</string>
	<key>platform</key>
	<string>Galaxy Nexus</string>
	<key>user-agent</key>
	<string>Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Galaxy Nexus Build/IMM30B) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30</string>
</dict>
<dict>
	<key>name</key>
	<string>Google Chrome</string>
	<key>version</key>
	<string>4.0.4</string>
	<key>platform</key>
	<string>Galaxy Nexus</string>
	<key>user-agent</key>
	<string>Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM30B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19</string>
</dict>