0

I have a web page built on AngularJS, that is optimized for full screen mode on iPads, using

<meta name="apple-mobile-web-app-capable" content="yes">

Everything works perfectly fine until the iPad gets locked (either due to prolonged inactivity or using the lock button). Once it is unlocked, the javascript behaves weird. Some of it works, but none of the AJAX calls work. I get a network error.

I see the same issue raised here: Javascript stops when iPad is locked, but it seemed to have gone unanswered.

I don't lock it during any ongoing AJAX calls, but when all the content has been loaded.

This seems to be related to the caching that happens with the full screen mode. Does anybody have any method to work around this? It is a show stopper as far as our application is concerned!

Update: I use grunt to build my project, so I have used cache-bust to add dynamic strings to the file names for eg. app.056fd53c6f25f5b2.js , but the issue still persists.

Community
  • 1
  • 1
nikjohn
  • 20,026
  • 14
  • 50
  • 86
  • I think keeps cached content. You can try to add "no" or put an js/ ajax refresh script in section see more http://stackoverflow.com/questions/8063126/how-can-i-clear-the-cache-of-an-ios-web-app-on-the-homescreen and $.ajaxSetup({ cache: false }); in http://ajinkyamandhare.blogspot.ro/2012/07/auto-refresh-web-page-using-ajax.html Hope it helps. – ares777 Nov 12 '14 at 10:37
  • I have disabled caching by adding dynamically generated strings to the file names. But the issue is still persisting :( – nikjohn Nov 12 '14 at 13:21

0 Answers0