Reputation: 6991
I am trying to download a property list from a webserver using -initWithContentsOfURL
The problem I am having is that Cocoa caches the response from the webserver and so the file I am trying to download. This means that the first time it will work fine but the second time, the file on the server has changed, it won't work properly. It just "downloads" ( just copies it from the cache.db database ) the old file.
What is the best way to work around this? Would I have to implement something more "sophisticated" like NSURLDownload?
Upvotes: 0
Views: 166
Reputation: 213378
What are the HTTP headers in the response? Try this at the terminal:
curl -I http://the-uri-for-the-plist
It is possible the server is specifying that the file can be cached.
Upvotes: 1