Re: [w3c/ServiceWorker] service Worker cache (#1088)

> how can i restrict some of my website pages from caching?

Things only cache when you call `cache.add(request)`, `cache.addAll(requests)`, or `cache.put(request, response)`. If you don't want something to cache, don't add it to the cache 😄.

> how can i create service worker that work only for mobile only?

A service worker is only registered when you call `navigator.serviceWorker.register(url)`, so if you want to register a service worker, don't call it. It seems like you're already using some logic to change the content you're serving for mobile, so leverage that.

I've closed this issue as it doesn't relate to the spec, but we're happy to continue to offer support (although stackoverflow would be better).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1088#issuecomment-290299352

Received on Thursday, 30 March 2017 04:29:58 UTC