Getting websites ready for Internet Explorer 10 on Windows Phone 8

Getting websites ready for Internet Explorer 10 on Windows Phone 8

  • Comments 8
  • Likes

As we announced in June, Windows Phone 8 will ship with Internet Explorer 10 – the same advanced web browsing engine that powers Windows 8. We’ll have much more to say about Internet Explorer 10 soon. The goal of today’s post is to help developers start getting their sites ready for Internet Explorer 10.

What’s the user-agent (UA) string for Internet Explorer 10 on Windows Phone 8?

The UA string of Internet Explorer 10 on Windows Phone 8 will look like the following:

  • Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; <Manufacturer>; <Device> [;<Operator>])

As you’d expect, the UA is mostly a continued evolution of the IE9 on Windows Phone 7.5 UA string, and it also aligns with IE10 on Windows. A couple of notes of interest:

  • The Platform token is now Windows Phone instead of Windows Phone OS.
  • The ARM and Touch tokens have been added, to align with the latest updates to the Internet Explorer 10 on Windows UA string.

The same best practices that we discussed when announcing the IE9 user-agent string apply:

  • Although the UA string is an important means of identifying a browser, you shouldn’t rely on it to target specific functionality. Instead, use feature and behavior detection to detect specific browsers wherever possible.
  • If you do decide to use UA detection, we suggest using the IEMobile token to identify Internet Explorer on Windows Phone as a mobile browser. If you would like to target code that requires new Internet Explorer 10 platform features on Windows Phone, you can use a regular expression to extract the IEMobile version token, and then check to see if it is greater than or equal to 10.

Simulating Internet Explorer 10 on Windows Phone 8

Even if you’re not part of the Windows Phone 8 SDK Preview program, you can still start validating your site for Internet Explorer 10 on Windows Phone 8. Windows Phone 8 shares the same Internet Explorer 10 engine with Windows 8, so a PC running Windows 8 is great for initial testing. If you don’t have access to Windows 8 yet, you can use the Windows 8 evaluation for developers to download a copy.
Here’s how to test this on your Windows 8 PC:

1. On Windows 8, open Internet Explorer 10.

2. Bring up the IE Developer Tools either by hitting the F12 key, or, on the Tools menu, click F12 Developer Tools.

3. Click Tools, click Change User Agent String, and then click IE10 for Windows Phone 8.
ie10f12-1

4. To resize the browser window, click Tools, click Resize, and then click 480x800.
ie10f12-2

Call to action

  • If you’re already detecting Windows Phones on your site using UA string detection, make sure that your detection logic continues to work correctly with the Internet Explorer 10 UA string.
  • If you haven’t already, take a look at the Internet Explorer 10 Guide for Developers to learn about new features in the web platform. Look for a more complete overview of Internet Explorer 10 web platform features in an upcoming post.
  • If you have a WebKit-optimized site (for iOS/Android), consider using that code as the basis for Internet Explorer 10 because it has extensive standards-compliant HTML5 support. In some cases, this will require ensuring that “-webkit” prefixed properties also have standards-compliant counterparts. We’ll also discuss this more extensively in a future blog post.
8 Comments
You must be logged in to comment. Sign in or Join Now
  • IE10 on the desktop (Windows 8) and either mode in WP8 (nokia 920) have an issue with responsive layouts.  concerning a responsive layout (twitter bootstrap) a 768px width layout in firefox/chrome will take 784px width layout to achieve the same function (nav menu).  Visit www.gantry-framework.org in FF and IE10.  resize to 768px and see for yourself.  Does IE10 automatically add a margin?

  • mjf
    0 Posts

    btw the User-Agent string for the Windows Phone 8 emulator is:

    User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; Microsoft; Virtual)

  • sumedh
    2 Posts

    @charles Morris : thanks for the article. I am very excited about the w8 and wp8 devices .. Am getting them , the moment they land in my country.

    @michael Hansen : we don't need illiterate people like you in our eco-system. People like you are not welcomed here.

  • Nathan
    63 Posts

    @Charles, thanks for the WP user-agent string in web browser. The Windows 7 version of IE10 is also announced today, please ensure that it will have the same features as IE10 for Windows 8.

    @Michael Hansen, Its hard to understand why and what exactly you are whining about. Secondly, if you are an iFruit or Goofy fan-boy, then join their communities and don't bother to come back here to embarrass yourself.

  • Leigh
    89 Posts

    @Michael if you don't have anything to say that is related to the article, please don't bother to comment.

    @Charles thanks for the fine article.

  • MN03
    3 Posts

    To quote a wise russian man: " Cry some more!"

  • goodbuy and thanks for allow me to be a beta tester of your product as nokia filmed ealy this year

    saying we where all betatesters

    it cost my company,, nice stund microsoft

    goodbuy, i wish you all well ,,

    Michael Hansen

  • sorry not my choise this time ,

    this time i whant to bet on somthing more secure ,,

    www.theverge.com/.../official-apple-ipad-mini-event-october-23

    course of the low spec of windows phone 8 ONLY DUALCORE that was the processor of 2011

    and now the surface tablet is tegra 3 chip back from  marts 2011

    i whant to feel and see the future this time, pehaps in 2017 i buy a windows product again mabey

    and android phone and ipad mini with keyboard to the price of 199 dollars

    sorry

    Michael Hansen