iPhone For Dummies: Updated for iPhone 12 models and iOS 14
Book image
Explore Book Buy On Amazon
When you’re testing a website intended for the iPhone and iPad on a desktop computer, if the device detection script on a server recognizes that you’re using a browser on a computer, it doesn’t show you the phone version.

That’s where user agent switching enters the picture. Safari includes special features that make it possible to change the user agent. To activate the User Agent Switcher, in Safari, follow these steps:

Click on the Gear shift icon, shown in the top right corner of the Safari web browser, to open the General Menu.

Click on the Gear shift icon, shown in the top right corner of the Safari web browser, to open the General Menu.

Open the General menu.

Choose Preferences.

These are also shown in the figure from the last step.

Click to select the check box labeled Show Develop Menu in Menu Bar.

Click to select the check box labeled Show Develop Menu in Menu Bar.

The cursor is pointing to it in this figure. The Develop menu option is added to the top menu bar.

If you don’t see the menu at the top of the Safari web browser, be sure to select the Show Menu Bar option from the general menu. When this option is selected, the name changes to Hide Menu Bar and the menu is visible at the top of the browser.

Click the Develop menu option and select User Agent→.

Click the Develop menu option and select User Agent→<i><user agent></i>.

This opens a list of profiles.

Open any web page to see how it displays with the selected profile.

Open any web page to see how it displays with the selected profile.

In the figure the iPhone profile is selected and the Facebook web page displays in a narrow column aligned to the left — the version of the page that’s optimized for the iPhone. You see how to resize the browser window in combination with the user agent to create a general idea of how the page will display on an iPhone.

About This Article

This article is from the book:

About the book authors:

Edward C. Baig is the personal and consumer technology columnist for USA Today, where he reviews the latest gadgets and reports on tech trends. Bob "Dr. Mac" LeVitus has been writing the "Dr. Mac" column for the Houston Chronicle for more than 20 years. A regular contributor to a variety of technology publications, he's a proud Mac aficionado who's written or co-written more than 85 how-to books on all things Mac, including multiple Mac operating systems, the iPhone, the iPad, Office for the Mac, and GarageBand.

This article can be found in the category: