Reputation: 444
Developing the Native App for ipad, Initial screen i have on 'ViewDidLoad' a webcall made to read a file on web getting me the results and showing the list.
Prob 1: when i change the content of file in Web it doesnt reflect in my app, even i kill app still result is old same. can anyone help me with this issue.
After this list select it lands to WebView.
Prob 2: When i change anything on server side javascript. it doesnt reflect on the Native App, it does still give me old response only. (i.e Javascript and Css changes are not reflect in App). Can anyone please help me throught this part.
IOS 7 native App in Ipad. If you need code i can post it.
Upvotes: 2
Views: 357
Reputation: 906
You should specify a CachePolicy
:
enum
{
NSURLRequestUseProtocolCachePolicy = 0,
NSURLRequestReloadIgnoringLocalCacheData = 1,
NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4, // Unimplemented
NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData,
NSURLRequestReturnCacheDataElseLoad = 2,
NSURLRequestReturnCacheDataDontLoad = 3,
NSURLRequestReloadRevalidatingCacheData = 5, // Unimplemented
};
typedef NSUInteger NSURLRequestCachePolicy;
Try this:
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:myURLString] cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:nil]];
Upvotes: 3