Search code examples
workbox

Does workbox-precache check the integrity of fetched files?


Afaik, in order for workbox precache to keep track of precached files, a md5 hash is created of the file and used as the file's revision number in sw.js (see get-asset-hash.js and generate-sw.js)

After fetching the file, does workbox create a md5 hash of the new file and compare its value with the revision number in sw.js?


Solution

  • Workbox doesn't seem to check the integrity of the new file via md5 (see PrecacheController.mjs, cacheWrapper.mjs and PrecachedDetailsModel.mjs)