The present user agent for the browser control that i see in the emulator is Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; Microsoft; XDeviceEmulator) and i want to change that to Mozilla/5.0 Windows NT 6.1 AppleWebKit/535.1 KHTML, like Gecko Chrome/14.0.835.187 Safari/535.1 or something similar.
How to code that in C# to change the user agent string for the web browser control.
Found a way webBrowser.Navigate("http://localhost/run.php", null, "User-Agent: Here Put The User Agent");
In Windows Phone 7.5, there is a Navigate method overload that allows setting the headers. There are 3 arguments ( URI, post_info, header_info) , not 4 as shown.
The overload worked for me.
Good luck. -e
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With