Quantcast
Channel: David Janes' Code Weblog » tips
Viewing all articles
Browse latest Browse all 10

NSURLConnection, ETag and caching

0
0

If you’re using NSURLConnection and using If-None-Match/ETag and you’re depending on getting a 304 status to determine that “nothing changed”, make sure you do this:

[request setCachePolicy:NSURLRequestReloadIgnoringCacheData];

If you don’t, after your first request/response cycle, NSURLConnection will start returning status 200 instead as it’s pulling the result from its local cache.


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images