0
votes

Can we restrict from storing cookies in sharedHTTPCookieStorage by default?

I am using other approach for session authentication and don't want cookies to be sent to server on each server request. Currently I read all cookies from sharedHTTPCookieStorage and delete them manually after Login.

It would be better if they are not set automatically by default at first place.

1

1 Answers

1
votes

I'm not an expert on this. But I worked on some apps that need to cache zero to none info for security reasons. I think that you could go with a combined approach. Defining a no-caching policy to responses, on NSCachedURLResponse and also intercepting calls with your own NSURLProtocol. Here's some info on the whole URL Loading system on iOS

I hope it helps a little! Good luck!