Azhar Bandri
Azhar Bandri

Reputation: 892

Restrict from storing cookies in sharedHTTPCookieStorage

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.

Upvotes: 0

Views: 80

Answers (1)

Pacu
Pacu

Reputation: 1985

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!

Upvotes: 1

Related Questions