I have done some more research and have come up with the following question – could this be done by having an editable list of files to be pre fetched during Service Worker Installation ?
Upon SuperPWA, all the assets will be cached for offline, if the contents are delivered within the domain scope.
At this time we didn’t have any option to precache some files for offline usage. As some browsers have only allocated a maximum caching storage capacity of 50MB (altogether for all the PWAs). The cached files will get deleted to allocate the new ones, if user accessed any other PWA. Due to that reason it will cause a bad solution if we cache some files via service worker for offline usage. Moreover it will makes a bad user experience if the user’s internet is very low.
Hi Jose
Thanks for responding quickly.
I understand your reasoning on this and agree for most instances this is a good approach.
There are however occasions where precaching a list of files is needed. In my scenario the user turns up at a site with no mobile data available. They can connect to wifi (which again is not connected to the internet) which serves out a web site. The wifi is only available in a small area and the user needs to play different audio tracks in non wifi areas as they explore the site.
It looks like we will have to write the code ourselves rather than use your plugin.
Thanks again for creating such a useful plugin that I am sure a lot of WordPress users will find very useful.
Best Regards
David
Glad to hear that. As I mentioned earlier, currently most of the browsers only allocated a limit on the caching memory for PWA’s – ie; 50MB. As per the PWA life cycle if the limit of 50MB is exceeded the older files which cached will get deleted. Due to that we are not providing such an option at this time. If the browsers escalate the limit then we will include that feature within our plugin.
Have a great day!