Does UIWebView pass on referral information? If a user clicks a link to my server and my server immediately redirects the request to a second server. Will the second server see the referral page? What’s the default behavior? If that information is pass to the second server, how can I prevent that?
Share
The default behavior for any HTTP agent, including Safari, is to add the Referer HTTP header, upon receiving a redirect response.
You can try implementing the UIWebViewDelegate protocol and listening to the webView:shouldStartLoadWithRequest:navigationType: message. when you get the message (assuming UIWebView will sent it for redirects), you can examine the headers collection of the NSURLRequest instance and if it contains Referer header, you can try removing it. I haven’t tried it, though, and it might turn out the headers collection is read-only.