Code being redirected to mobile site
I am currently getting a webpage using java URL, however it is being redirected to the mobile version of the site.
Is there a way to mimic开发者_Python百科 the browser so I get sent to the main version?
Thanks.
Yes, you can have your software pretend that it is a PC/Mac browser by explicitly setting the User-Agent string for your request. Wikipedia info.
Added: What is happening
Some designers look for specific Mobile User-Agent values (eg Android, iPhone, etc) and send just those requests to their mobile sites. By default, they send all other requests to the "regular" web site. I think this is the best technique.
Other designers do the opposite. They send the mobile web site by default and only send the PC/Mac site in response to requests from specific User-Agent strings.
精彩评论