문제

I'm writing a Cordova app, which is configured to use a NSURLCache.

For security reasons, I'd like to prevent certain requests and responses from being written to disk. How can I do this? (My concern is not about reusing cached data in subsequent requests; I don't want the data to be written to disk at all.)

Does iOS respect the Cache-Control: no-store header, in requests and/or responses? Since this is a browser application, I can't use any Objective C code when making individual requests.

도움이 되었습니까?

해결책

Does iOS respect the Cache-Control: no-store header?

Yes.

If using a third party, you'll need to make sure that you're not using any third party libraries that ignore this header, though. For example, SDWebImage has its own caching rules, while AFNetworking just uses NSURLCache.

Some more helpful details are here: http://nshipster.com/nsurlcache/ (the Apple documentation on this class is lacking.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top