Sorry, I would just test this myself, but I'm currently without my mac. Does a web request made inside of a UIWebView send the same user-agent info that a web request made from mobile Safari would?
views:
588answers:
2
+1
A:
Yes. Yes it does.
However, you can override it. If you create a NSMutableURLRequest
to seed the web view with you can set all your own headers. Check out the method:
- (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)field
Squeegy
2010-01-27 00:35:40
I appreciate the tip on how to set the user-agent. I'm not sure it's correct that UIWebView has the same user-agent as Safari though. In some limited tests I've done since posting this, Safari seems to differentiate itself by including "Safari" in the user-agent string, where UIWebView does not.
dl
2010-02-01 17:08:37
dl - did you find the answer to this? I have the same problem.
amok
2010-09-25 00:31:59
A:
I found that a UIWebView was sending this
<AppName>/1.0 CFNetwork/459 Darwin/10.2.0
but that was while using the simulator, I have not tried on a device yet.
Robot Woods
2010-03-12 01:00:41