Feature Pack 4 or later

Preparing your Web browser to view mobile-specific pages

Feature Pack 4 or laterDesktop browsers can be configured to simulate the mobile environment to allow you to view your mobile site without using a mobile device. In this lesson, you modify the user-agent string that is transmitted by the browser. The browser type is specified in the user-agent string and, if the server is configured to deliver pages specific to the particular mobile device browser, the device-specific pages are returned.

Procedure

  1. Use one of the following user-agent switching tools for the browser you are using:
    • Mozilla Firefox with the User Agent Switcher add-on
    • Safari includes a built-in user-agent switching tool that is not visible by default. To enable the tool:
      1. Navigate to Edit > Preferences.
      2. Under Advanced, select Show Develop menu in menu bar.
      3. Click OK. The Develop menu appears.
      4. Under Develop > User Agent select the user-agent corresponding to the device you want to target.
    • Google Chrome has built-in user-agent spoofing as part of its developer tools. For more information, see Google Developers: Useragent Spoofing.
    • Windows Internet Explorer has a built-in device emulation as part of its developer tools. For more information, see Internet Explorer Dev Center: Using the F12 developer tools.
  2. The following sample user-agent strings can be used:
    Apple iPhone – Safari iOS 7
    Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53
    Apple iPad – Safari iOS 7
    Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) CriOS/30.0.1599.12 Mobile/11A465 Safari/8536.25
    Feature Pack 6Feature Pack 5Feature Pack 4BlackBerry Playbook
    Feature Pack 6Feature Pack 5Feature Pack 4Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; xx-xx) AppleWebKit/534.8+ (KHTML, like Gecko) Version/0.0.1 Safari/534.8+
    Feature Pack 6Feature Pack 5Feature Pack 4BlackBerry Storm 9530
    Feature Pack 6Feature Pack 5Feature Pack 4BlackBerry9530/4.7.0.41 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/-1
    Feature Pack 7 or laterBlackBerry Z10 - BlackBerry OS10
    Feature Pack 7 or laterMozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+
    Feature Pack 7 or laterWindows Phone 8
    Feature Pack 7 or laterMozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)