Private browsing with UIWebView on the iPhone & iPad -


How do the existing apps apply this feature ???

Can I only store cookies for some sites, and only inside my app? It's my understanding that web views store cookies in shared mode ... so that they can be shared with other apps that use Safari and UIWebView.

NSHTTPCookieStorage , cookies are not shared between applications:

iPhone OS Note: Cookies are not shared between applications in the iPhone OS.

It seems that they should be "private" by default. You can also use [NSHTTPCookieStorage sharedHTTPCookieStorage] to set cookie storage policy to not store all cookies on an object, or you can use deleteCookie: If you need to clean the method after yourself.

Other content is loaded with your UIWebView when you create NSURLRequest that is loaded with your webview, as you can determine if a cache policy content will be accumulated. For example:

  NSURLRequest * request = [NSURLRequest requestWithURL: [NSURL URLWithString: URL] cachePolicy: NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval: 60.0] [WebView loadRequest: request];  

NSURLRequestReloadIgnoringLocalAndRemoteCacheData tells the request to ignore the cache and load the request from the network. I'm not sure if this also protects the network from being cached, but be sure that you can alway remove it from your own:

  [NSURLCache sharedURLCache] removeCachedResponseForRequest: request];  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -