ilan-schemoul / meteor-service-worker

An universal service worker for meteor apps
MIT License
137 stars 26 forks source link

How do I cache files from a sub-domain? #10

Closed s7dhansh closed 7 years ago

s7dhansh commented 7 years ago

I tried using cache.addAll([HTMLToCache, 'https://sub.domain.com/']) but it does not work.

On a side note, in https://github.com/NitroBAY/meteor-service-worker/blob/master/sw.js#L45, why are you using cache.put(HTMLToCache...) instead of cache.put(event.request.... Isn't the latter better (It ensures even static html to be cached with their respective urls? The former assumes there is only one html at the root.

EDIT: Typo fix

stephane-r commented 7 years ago

Hi @s7dhansh

Maybe you can try with cache.addAll([HTMLToCache, 'https://sub.domain.com/']) ?

ilan-schemoul commented 7 years ago

Whatever the URL is the HTML returned by the server is the same. The HTML in Meteor

is only composed of request ( and Githubissues.

  • Githubissues is a development platform for aggregating issues.