Apr 14, '10 07:30:00AM • Contributed by: cDizzle
Caution: This tip requires that you modify a file within Safari.app's Resources folder. I cannot guarantee this will not cause you grief, or break the application's code signing.
This tip also requires you to install the Developer's Tools (for the use of Property List Editor.app), or at least be familiar with editing .plist files.
Here's how to do it:
- From Safari, go to the Preferences menu and select the Advanced tab, then enable 'Show Develop in menu bar.' Quit Safari when done.
- In Finder, select Go » Go to Folder, and when the dialog box appears, enter this path: /Applications/Safari.app/Contents/Resources.
- In the Resources folder, locate the file named UserAgents.plist. Back up the file somewhere safe just in case your editing goes awry -- I dragged it to my Desktop and renamed it UserAgents.plist.bak.
- Open the original UserAgents.plist file with Property List Editor.app.
- Somewhere between the items that already exist, you will want to create a new entry. I found that Item 4 was just a separator and Item 5 was the first of the Mobile Safari user agents. I simply copied Item 5 and pasted it. (Select Item 5, then press Command-C followed by Command-V). This copies all the attributes of Item 5 to a new entry called Item 6, and renumbers all the entries that follow.
- Change the properties of Item 5 to match the iPad's characteristics (name = "Mobile Safari", version= "3.2", platform= "iPad").
- For the user-agent string, enter the user agent properties of the iPad (gleaned from this link):
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10 - Choose File » Save As, and save to the Desktop. Do not change the name.
- Drag the UserAgents.plist file from the Desktop into the /Applications » Safari » Contents » Resources folder. (Finder will ask you to want to replace the original and will ask you to authenticate.)
- Open Disk Utility.app and run a Repair Permissions on your hard drive.
Enjoy! Remember, I make no promises that this won't muck up your Safari.app. Seems to be working well for me, anyways.
