Revert mobile website to wb7 WebBrowser control?

Is it possible to return web pages in a mobile format, if any, before showing normal rendering of a web page? I noticed that I get both when used. Or is it enabled by default?

EDIT: for example, on your phone, for example, you can request web pages in the mobile version or the desktop version. Is this option available to developers, and if not, what is the default for the control?

0
source share
3 answers

Unfortunately, there is no API to switch this parameter - and there is no easy way to intercept outgoing HTTP calls from a browser control.

- , , "/" User-Agent:

- Mozilla/4.0 + ( + MSIE + 7,0 + Windows + + OS + 7,0 + Trident/3.1; + IEMobile/7,0 + Microsoft + XDeviceEmulator)

- Mozilla/4.0 + ( + MSIE + 7,0 + Windows + NT + 6,1 + XBLWP7 + ZuneWP7)

, " " - http://www.elucidsoft.com/blog/2010/11/19/windows-phone-7-user-agents/

, - , , , ( , , ).

+3

, , , :

string header = "User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1, Mac OS X; en-us) AppleWebKit/532.9 (KHTML, Gecko) /4.0.5 /8B117 Safari/6531.22.7";

MyWebBrowser.Navigate( Uri ( "http://www.google.com" ), null, );

( - gmail):

Mozilla/4.0 + ( + MSIE + 7,0 + Windows + + OS + 7,0 + Trident/3.1; + IEMobile/7,0 + Microsoft + XDeviceEmulator)

+2

The control WebBrowserdoes not provide an API that allows you to choose between Desktop or Mobile version of a web page. You can use Fiddler to capture traffic for outgoing requests (from emulator or device ) to find out if there is anything in particular about the request that you could play in yoru's own requests.

+1
source

All Articles