Skip to content

Workbox v6.3.0

Compare
Choose a tag to compare
@jeffposnick jeffposnick released this 09 Sep 17:41
· 50 commits to v6 since this release

Workbox v6.3.0 includes a couple of bug fixes and several new features.

🎉 What's New?

Allow precaching "repair" when using subresource integrity

Although unexpected, there are edge cases where the precache might not be in an inconsistent state, most likely due to a developer manually deleting something in DevTools.

When this happens, workbox-precaching defaults to falling-back to using a network response (assuming the device is online) when there's a precaching miss. Up until now, workbox-precaching hasn't attempting to use this network response to repopulate the precache, because there are no guarantees that the network response corresponds to the version of the asset specified in the precache manifest.

However, if the precache entry includes an integrity property, then subresource integrity guarantees that the response does correspond to the same version of the asset in the manifest. So it should be safe to "repair" the cache with that response. [#2921]

IDB writes use relaxed durability

This small change to the way Workbox writes to IndexedDB should lead to slightly better performance, without any appreciable downsides. [#2934]

notifyAllClients option in BroadcastCacheUpdate

BroadcastCacheUpdate uses postMessage() to notify all open tabs controlled by the current service worker about a cache update. This default behavior is not changing.

Setting notifyAllClients: false when configuring BroadcastCacheUpdate and the associated plugin will result in postMessage() only communicating the update to the specific window client that triggered the fetch request which resulted in the cache update. [#2920]

All WorkboxEvents TypeScript types are now exported

This enhancement makes it easier to use TypeScript to write workbox-window event handlers. [#2919]

Debug logging when caching responses with Vary: headers

The presence of Vary: headers on a cached Response can make it difficult to properly match and delete cache entries. To make it clearer to developers when this is happening, the development builds of Workbox will now log a message to the console when a Response that's being cached includes a Vary: header. [#2916]

🐛 What's Fixed?

workbox-cli

  • Update to chokidar dependency, for better node compatibility and to eliminate security warnings. [#2913]

workbox-precaching

  • Preserve all request headers in PrecacheCacheKeyPlugin. [#2914]