I am attempting to open mobile safari from an iOS app to open an offline HTML5 app with openURL:
NSString *urlString = [NSString stringWithFormat:@"http://localhost:8080/blargh.html"]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
blargh.html has an HTML5 manifest:
That manifest contains the html file: CACHE MANIFEST blargh.html
This all works as expected, when I open the URL from my iOS app, it is cached properly and works offline. However, it doesn't cache properly if I include dynamic cgi params:
NSString *urlString = [NSString stringWithFormat:@"http://localhost:8080/blargh.html?q=p"]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
This basically means that I can't open an offline HTML5 app from an iOS app and pass it params and have it cache properly. I need to open the app in mobile safari and not a webview for reasons that are beyond this post. As far as I am aware there is no way to send post params through openURL. I would have hoped that mobile safari's caching system would have been smart enough to ignore cgi params.
Any suggestions?