Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Add Cache-Control headers to requests in ForceTK #27

Open
bhariharan opened this issue Feb 1, 2013 · 0 comments
Open

Add Cache-Control headers to requests in ForceTK #27

bhariharan opened this issue Feb 1, 2013 · 0 comments

Comments

@bhariharan
Copy link

As of iOS 5, HTTP responses received within a web view would be cached only in memory, and not in the filesystem. However, in iOS 6, response data is cached in the filesystem in plain text, at this location - '[Application]/Library/Cache/[application name]/Cache.db'. In order to prevent sensitive data from being cached, it would be a good idea to add this line to all outgoing requests that go through ForceTK.

xhr.setRequestHeader('Cache-Control', 'no-cache, no-store');

within the ajax call in

forcetk.Client.prototype.ajax = function(path, callback, error, method, payload, retry) {}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant