NSData +dataWithContentsOfURL has any kind of caching by default? Has anyone experimented some kind of problems using this method, what is the most efficient way to get Data from the web?
+1
A:
The documentation doesn't say that it will cache, so I think we should assume that they don't do any caching.
Which kinds of data you want to get
UIImage : yes, I think you should use NSData
Video: you should use MPMoviePlayerController for streaming
Text: I think you can do normal NSUrlConnection. It also has asynchronous, synchrnous and caching
vodkhang
2010-08-23 15:19:55
I need to get configuration files in XML format, i should use NSUrlConnection, right?
cesarnicola
2010-08-23 15:25:35
Yeah, I think you should use NSUrlConnection and do asyncrhonous to prevent blocking UI
vodkhang
2010-08-23 15:31:29
+1
A:
Use ASIHTTPRequest. It's a third party HTTP client library that makes network interaction MUCH simpler, and has very nice caching functions.
Dan Ray
2010-08-23 15:52:53