PWA and HEAD request

Hi, i have a PWA and i’m trying to have it working totally offline.
I’m facing this problem.

Basically it seems that even if the video are in the cache, the app need to have a working link anyway. If i try to run the app with an internet connection, it clearly access to the file in the cache (they are some Gb), but without connection it gives this error, even if we have cached files.
HEAD instruction seems to be the problem.

What i should modify in my playcanvas project to solve?

Any suggestion?

@yak32 or @Mark_Lundin might have some suggestions?

1 Like

From my experience with caching videos one issue for ios-devices is that for proper caching of videos you have to implement something called “range requests” in the service worker. The problem is that ios expects you to serve videos in streaming like manner, even if they are cached.
Jeff Posnick pointed me in the right direction, maybe this can help you too:

1 Like

Not sure if you’ve already done this, but if you need the PWA to work entirely offline, you’ll need a Service Worker that implements an offline cache.

This has some pointers Making PWAs work offline with Service workers - Progressive web apps | MDN