0

I'm working with Serviceworkers and ApplicationCache and was wondering: Can I access the ApplicationCache contents from another script?

For example I was thinking of creating a fallback manifest in case a browser did not support serviceWorker for offline caching and thought it would be nice if I could just pick the entries on the manifest for caching in the serviceworker instead of maintaining a duplicate list.

I did not find any info online on whether it was possible and console-ing around with the ApplicationCache object does not give me its contents either.

Thanks for some inputs.

frequent
  • 27,643
  • 59
  • 181
  • 333
  • You want to read the text of the manifest, or the contents of the cache? – jrtapsell Oct 15 '17 at 09:34
  • The text of the manifest. I just realized I could just fetch the manifest file from within the serviceWorker. If that worked, parse it and viola, I have my list of assets to cache. Trying now. – frequent Oct 15 '17 at 09:43

0 Answers0