开发者

How to make the UIWebView render the standard version of a webpage instead of automatically being redirected to the mobile version?

开发者 https://www.devze.com 2022-12-31 02:29 出处:网络
The server in some ways redirecting all the request into its mobile version, in which it lac开发者_运维技巧ks information, I want to render the page in the standard version using the UIWebView. What w

The server in some ways redirecting all the request into its mobile version, in which it lac开发者_运维技巧ks information, I want to render the page in the standard version using the UIWebView. What would I have to do? I have tried to set the "User-Agent" of the NSURLMutableRequest to Safari but it does not work. Any ideas why?

NSMutableURLRequest *mutableRequest = [request mutableCopy];    
[mutableRequest setValue:@"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_7; en-us) AppleWebKit/533.4 (KHTML, like Gecko) Version/4.1 Safari/533.4" forHTTPHeaderField:@"User_Agent"];


It's User-Agent, not User_Agent

0

精彩评论

暂无评论...
验证码 换一张
取 消