Google
 

The Ultimate Guide for switching from a PC to a Mac
(Part 2 - coming soon)

Sunday, December 2, 2007

The Safari mobile version of a website!

This works in both Tiger (Safari 3 required) and Leopard.  There was a tip previously about how to enable the Debug menu in Safari.  What was very useful about this is that it lets you change the "User Agent" so that the website you visit believes you are not using Safari.  The reason why it is useful is because some websites check to see if you are running Internet Explorer and will block you if you are not.  It is usually done because the website wasn't tested in other browsers.  Most of the times, the website runs just fine in Safari though.  The reason why I am bringing this up today is because there are a lot more options in the debug menu of the new Safari 3.  One of them that really pops up is in "User Agent" and it is "Mobile Safari 1.0".  By changing the user agent to the mobile version, all the websites you visit will think you are using an iPod Touch or an iPhone and when available, the iPhone version of the website will be displayed.  It can be very useful if you are working on doing this on your own website.  It will let you test how it really looks like without having to buy an iPhone or an iPod Touch.  Here is how you can enable the Debug menu in Safari 3:

Option 1:

1. Close Safari.
2. Open Terminal.
3. Paste the following line:

defaults write com.apple.Safari IncludeDebugMenu 1

4. Reload Safari and the debug menu should now be enabled!

Option 2:

1. If you don't want to use Terminal, you can also do the same thing in OnyX.  Check "Enable Debug Menu" in the Safari tab of the Parameters tab.  Make sure you have the latest version of OnyX which is supposed to add Leopard compatibility.

5 Comments:

Blogger walewa said...

Another way of testing iPhone WepApps is using the freeware application "iPhoney" and you get the iPhone interface.
iPhoney

December 3, 2007 at 7:36 AM  
Blogger Nic said...

k great....
now how do i get rid of it again? :-D

December 3, 2007 at 7:50 AM  
Blogger MacTipper said...

To get rid of it, type:

defaults write com.apple.Safari IncludeDebugMenu 0

(Notice the 0 at the end.)

In general, to reverse an action, change the 1 to a 0 and a True to a False.

MacTipper
The MacTipper Blog

December 3, 2007 at 10:02 AM  
Blogger Mark Wheeler said...

Is there a way to make this the default in Safari? When I quit Safari and then relaunched it went back to "normal." Great tip, this could save me from having to get Parallels & Window on my mac. Thanks!

December 3, 2007 at 11:56 AM  
Blogger Reconstructivist said...

great tip one of my favs! thanks

December 3, 2007 at 7:12 PM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home

Brain Toniq. Clear the head fog
Pay Per Click Ads by pay per click advertising by Kontera