WebBrowserControl and WebBrowserTask not matching?

6 March 2012

Was debugging a very interesting issue today - had an app that was loading a website, that was working on a Nokia Lumia 710 (aside - which looks and feels a lot better in the hand than it does in pictures; its not as plasticy or budget as I imagined) but not displaying correctly on a Lumia 800. However, if the website was loaded directly, either using a WebBrowserTask or just in IE itself, it displayed fine on both phones.

It turns out that the site that was loading, was doing some filtering based on user agent strings. Which is cool, but still not immediately obvious as to why phone worked and one didnt - after all, they were both running Mango so should both be rendering with IE9, right?

The answer to this is that the app was created a while back, in 7.0 / pre-Mango land; before IE9, the user agent strings weren't standardised and each phone had its own (you can read more about it in this excellent blog post). Post mango, they all use the same user agent string... However, and this is the catch; WebBrowserControls still render the old user agent string until you recompile and update your application to 7.1 / Mango!

Easy fix, right? :)

Tags: Lumia, User Agent, wp7

Add a Comment

No Comments