当前位置: 动力学知识库 > 问答 > 编程问答 >

objective c - HTTP requests from iPhone UIWebView and iPhone Safari / PC / Mac

问题描述:

I'm quite a newbie on HTTP and client and server stuff.

On the server side, is there a way to tell the difference between HTTP requests sent from "iPhone UIWebView" and "iPhone Safari / PC browsers / Mac Browsers", given that I the programmer don't add extra fields to the iPhone UIWebView request?

Thanks in advance.

网友答案:

No, since UIWebView's send a user agent akin to the one send with Mobile Safari. Last I checked, there wasn't anything noticeable that differed between the two, though that could've changed. Try sniffing the HTTP requests with a tool like Wireshark and see if they differ.

网友答案:

The User-Agent string sent by UIWebView on iOS does not include the word "Safari", but the User-Agent string sent by Safari does include "Safari".

This is a partial duplicate of this question: Does UIWebView send the same User-Agent in the Request Headers as mobile Safari?

分享给朋友:
您可能感兴趣的文章:
随机阅读: