QUICK Answer
How to make ServiceWorker survive cache reset/Shift+F5?
Theorically (*), you can do it with js plugins which detect the key hit of Ctrl
or Shift
... then prevent the "force refresh" to happen
...but there is a story behind this Ctrl
/Shift
reload.
(*) disclaimer: I've not tried this yet
LONG story... (kind of)
This is actually a spec of Service Worker. And only present in recent change of Chrome. For the earlier version of Chrome , Service Worker has no any issue surviving a "force refresh".
Along with the spec from W3C
navigator.serviceWorker.controller returns null if the request is a force refresh (shift+refresh).
Also, there are many people (**) has suggested that a "force refresh" should always clear out all kind of caches. Which is matched with the purpose of its existent and its spec.
...Furthermore, we even got it on the wikipedia...
Wikipedia: Bypassing your cache means forcing your web browser to re-download a web page from scratch
(**) us, web developers in the early stage of service worker.
In my opinion I think it is OK to let a force refresh doing its job. Since pretty much all of us always expecting the browser to not use any cache when we doing this.