I have a simple WPF application with a webbrowser control. When I direct the control to load a page I’d like to have the control tell the server it’s trying to load the page from that it’s a mobile device and therefore load the smaller version of the page. I know a lot of sites just add mobile before the address, so google.com’s mobile page is just mobile.google.com, but I’m wondering if there is a way to load the have the web server automatically direct my webbrowser control to the mobile version of the site? I feel like there should be a very simple way to do this, but I just can’t figure it out :).
Thanks in advance!!!
This will generally be controlled by the site using the User Agent, which is not something you can change with the standard WebBrowser control. There is an alternative WPF webbrowser control, based on Chromium, which you can download from CodePlex. It might not support User Agent spoofing out of the box, but it’s open source so you can manually change it in the code to an iPhone, Windows Mobile etc.