NSURLConnection is returning old data

后端 未结 2 1085
再見小時候
再見小時候 2021-01-03 04:49

In my application, I am loading JSON data using the NSURLConnection method, what looks like this:

NSURLRequest *request = [[NSURLRequest alloc]         


        
2条回答
  •  青春惊慌失措
    2021-01-03 05:15

    The easiest solution to prevent request caching is to add a timestamp parameter with current time at the end:

    http://example.com/api.json?my=args×tamp=2344992923
    

提交回复
热议问题