
When you click OK, the page will reload and show you what your page looks like in the iPad. Previous versions of Safari required you to add the code for each iDevice yourself, but as of version 5.0, they are available as an included option. Now by clicking the little “page” icon next to the asterisk icon, select Develop, User Agent, iPhone(or iPad or iPod Touch) from that menu. Enable the “Show Develop menu in menu bar” by clicking the checkbox and closing the window (oddly, there is no OK or close button–you will have to close it by clicking on the X in the top, right of the window). You can get to it by clicking the dropdown next to the little asterisk image at the top right of the Safari browser.Īdvancedis the last icon to the right in the popup window. Once it’s finished installing, open the browser, and go to Safari’s Advanced Preferencepane. Let’s get started! If you don’t already have it installed, downloadand install the Safari web browser. Safari then shows you how that page would look if you were viewing it on the actual iDevice. Safari allows developers to modify the string that the browser sends out, fooling the web server into sending back the page as it was designed to appear on the device as specified by the developer. The string includes identifying characters that also tell it if the browser is on an iPhone, iPad or iPod Touch. When you use a web browser, whether it’s on your desktop computer, laptop or mobile device, any time you go to a web page, that browser sends a string of text that lets the web server know specifically which browser is being used to request the page.

Apple’s Safari web browser can easily be used to test your site by simply changing the user agent that the browser identifies itself with. Most tutorials make the assumption that developers currently possess an iPhone to test their iDevice-ready website on, but we won’t do that. This week we’ll show you how to use Apple’s Safari web browser for testing your iDevice-ready website by simulating an HTTP request from Safari on the iPad, iPhone and iPod Touch. Last week we showed you how to detect the iPhone & iPad’s user agent.
