Not possible to cache external files with UpUp?
josephrocca opened this issue · 2 comments
(This is a question, rather than a bug report, so most of the issue template heads didn't make sense. Let me know if I should move this to stackoverflow)
Hi there, I'm trying to work out how to cache some Google Fonts files with UpUp, and on the surface this doesn't seem to be possible, but then I stumbled across this article where they appear to be caching a Google Fonts url. I haven't dug into the service worker apis yet, but was just wondering if this feature is out-right impossible with a library like UpUp, or whether it's just not implemented yet?
same here; I haven't been able to cache an icon onto my offline website, and an image. What should be done in order to have them available offline?
You cannot cache Google Font files that are hosted on Google's servers (unless you are Google) as those files are outside the scope of the service worker.
Check out the section on scope in the docs... but basically if your upup.sw.min.js
is on https://www.yourdomain.com/site_1/upup.sw.min.js
than you can only cache files that are under https://www.yourdomain.com/site_1/
… Something like https://fonts.googleapis.com
is outside that scope.