0

I recently made a web application that utilises Application Cache extensively. It caches a big chunk of data (Some 600 requests and about 50 megabytes). The content is faily static so thats 4-5 minutes download time is OK.

However, once there is a changes to the manifest, and new data download begins I would like to keep the download process running also accross page loads (As the user navigates accross the web app)

Target platform is iOS (iPad) and safari keeps starting the download process over on a new page load.

On Android however, download is progessing nicely accross page loads. Anyone with tips on how to achieve the same in iOS?

  • Things I have on my list to try is catching all hrefs in JS and fire off xhr requests instead then inject the response to the already loaded DOM. Input on that approach? – user3576742 Apr 26 '14 at 19:02
  • 1
    Do you have a minimal test case for this? It sounds like a bug to me. – Jesse Rusak Apr 26 '14 at 19:19
  • Not sure I agree this is a bug.. After all the webapp is doing a new page load. I think its just Chrome on Android being clever and spawning the application cache activity to a seperate thread and keeps it running under the hood.. – user3576742 Apr 26 '14 at 19:36
  • Figured I'd explain when i ended up doing in case anyone stumbles by this thread. The XHR method outlined above worked well (Tried that first), but the simplest approach is to create a wrapper startpage that contains nothing but the manifest reference and an iframe containing the "old" startpage. When user clicks a link in the iframe, only the iframe content is reloaded, manifest keeps downloading – user3576742 Apr 27 '14 at 16:19
  • You might make that an answer rather than a comment for future visitors. – Jesse Rusak Apr 27 '14 at 17:07

1 Answers1

0

Figured I'd explain when i ended up doing in case anyone stumbles by this thread. The XHR method outlined above worked well (Tried that first), but the simplest approach is to create a wrapper startpage that contains nothing but the manifest reference and an iframe containing the "old" startpage. When user clicks a link in the iframe, only the iframe content is reloaded, manifest keeps downloading