windows phone browsers and samples

In OS 7.5 (or version 7.1 – very confusing), they have fixed the browser behaving badly scenario whereby bing translate had been breaking out of frames and picking up a screen that was smaller than expected

 

Along the way, I made a few discoveries:

http://www.myhttp.info/ = prints out your user agent.

Some common flavours:

  • desktop = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; managedpc)
  • windows phone 7.5 = Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; Nokia; Lumia 800)

For an explanation on user agent strings.

For small memory windows phones, eg: Nokia’s new under-256Mb phone, you are being encouraged to launch existing applications through tasks. Check out this link for How to: Use the Web Browser Task for Windows Phone. This opens a new web browser outside of your app, back button goes back into your application.

I used webBrowser1.Navigate(new Uri(url1+extraOnEnd, UriKind.Absolute), null, “User-Agent: Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))”); to rewrite headers – which worked ok.

Some other code samples available on:
http://msdn.microsoft.com/en-us/library/ff431744.aspx#BKMK_Fundamental