I use sw-precache to create my service with the Polymer CLI build process, so it intends to update the hash of the updated files to signal that the cache needs to be updated. But my updated content is not replaced in the cache, so it gets the old version if I update ctrl + r, but the new version if I update ctrl + shift + r. The reason for this may be that my service worker is not updating.
This document states that
If there is even a difference in bytes in the working user's file compared to what he currently has, he considers this new.
but what if my new service worker did not change the byte? (how does this happen if only one hash has changed). How to configure sw-precache to update the service with every new request?
If the hash of the file has changed, this is enough to ensure that the support JavaScript file generated by using sw-precacheis changed. This, in turn, is enough to trigger a stream of service employee updates.
sw-precache
, , , JavaScript HTTP, , .
. fooobar.com/questions/229561/... , HTTP , .
, 1- (24-) , , .update() ServiceWorkerRegistration .
.update()
ServiceWorkerRegistration
Chrome "Empty Cache and Hard Reset" ( , ) script.
'sw-precache' Workbox, , , ( , sw-precache, , ). - , , - - , , " ".
(ctrl-r) , -. , " " . , , .
ctrl-r
(shift-ctrl-r) itll , .
shift-ctrl-r
devtools, , .
Source: https://habr.com/ru/post/1668045/More articles:Finding a string in all properties of an object in Angular 2 - angularУстановка тега Span на всю ширину кнопки - htmlНе удается запустить интерактивный сеанс R из командной строки - окна 10 - python-2.7Python Multi-threaded for loop with limited threads - pythonJava JDBC doesn't use String values? - javaDelayed worker desktop update - javascriptGetting RuntimeError: "To use #url_for, you must explicitly enable routing helpers" when I already turned them on - ruby | fooobar.comAre there public announcements for ExtendedPropertyDefinition identifiers? - enumsSeparation of sentences in python - pythonHow to use regex module in python to split a line of text into words only? - pythonAll Articles