all
strategy usesversion
passed to options as a cache tag. When version changes, old version cache is removed and new files are downloaded. Of course if files has same name were not changed (304 status returned), then probably browser won't download them again and will just update cache.changed
strategy is more advanced thanall
orhash
. To work properly it requires output assets to have unique names between compilations, e.g. file's unique hash in its name. With this strategy enabled,index.html
file (or other files without dynamic name) should be placed inmain
section of the cache, otherwise they won't be revalidated.- For
ServiceWorker
this means that only new files will be downloaded and missing files deleted from the cache. - For
AppCache
it's basically same as previous strategies sinceAppCache
revalidates all the assets. 304 HTTP status rule of course still works.
- For