1

I'm currently building a single large HTML5 application (using angularJS) and I have recently discovered appCache.

This is working perfectly, as expected but I'd like to optimize my loading. Ideally, I'd like to define 2 manifest.appcache but I really don't know how to perform that

Why that ? I have only a very few item updated that I want to download for every release. For exemple, all vendors librairy are rarely changing.

Therefore, I was looking forward to have a vender.appcache & myapp.appcache

Is there anyway to acheive that ?

lazyLoading ( oclazyloading ) is not a proper solution for me as it does not work offline.

My webserver is Tomcat7 for instance.

Community
  • 1
  • 1
aorfevre
  • 5,034
  • 3
  • 21
  • 51

1 Answers1

1

You could generate your manifest file dynamically on the server. Have two manifests, one for vendor resources and another for app resources. When the page is requested, have the server run some routine that will combine the two and save them as master.appcache or something. The page you return should reference that file.

Mike Nitchie
  • 1,166
  • 2
  • 13
  • 29
  • this is what i do actually, but when the manifest changes, the enduser has to D/L everything again from scratch – aorfevre Jun 16 '15 at 15:43
  • 1
    Understood. [Looks](http://stackoverflow.com/questions/7807563/how-to-support-multiple-custom-cache-manifest-for-offline-use-on-a-user-by-user) like [iFrames](http://stackoverflow.com/questions/7843531/html5-cache-is-it-possible-to-have-several-distinct-caches-for-a-single-url) might be your solution. – Mike Nitchie Jun 16 '15 at 15:48
  • 1
    Seems exactly what I was looking for (iframes). Thx ! – aorfevre Jun 16 '15 at 16:02