Closed EloyID closed 2 years ago
Thanks for this @EloyID!
My service working was throwing an error because of the same line, causing quite a few oddities. I changed:
Line 88: caches.open(version).then(cache => cache.put(event.request.url, clonedResponse));
Line 99: caches.open(version).then(cache => cache.put(event.request.url, clonedResponse));
Now it is working very well for my app!
Hey, Thank you very much for your interest. Actually the reason I put cache.put(HTMLToCache, clonedResponse) was because Meteor projects are SPA (single web page application) so every single page has the same HTML. It means that it was a waste a space to cache each page differently. Instead if HTML is request I always cache under the same request url ('/') and I serve it if HTML is required.
I'm not totally sure about this, just came here from your post. Verify it's correct, but I think cache.put should receive the request and not the html files