| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| workbox-v4.0.0-rc.0.zip | 2019-02-06 | 163.6 kB | |
| workbox-v4.0.0-rc.0.tar.gz | 2019-02-06 | 102.4 kB | |
| README.md | 2019-02-06 | 3.2 kB | |
| Workbox v4.0.0-rc.0 source code.tar.gz | 2019-02-06 | 589.9 kB | |
| Workbox v4.0.0-rc.0 source code.zip | 2019-02-06 | 937.3 kB | |
| Totals: 5 Items | 1.8 MB | 0 | |
The latest RC release of Workbox v4 includes the following developer-visible changes, in addition to all the changes from the previous pre-releases.
🎉 What's New?
workbox-window
-
The addition of a
scriptVersionoption to theWorkboxconstructor in beta.2. has been reverted, as well as the change to the function signature. TheWorkboxfunction signature is now the same as it was in beta.1 [#1876]::::js new Workbox(scriptURL, registerOptions);
workbox-google-analytics
- If you use Google Tag Manager (GTM) to load Google Analytics on your site, Workbox will now cache the
gtm.jslibrary so it will work offline as well [#1869].
workbox-expiration and workbox-broadcast-update
The npm names of these two packages has change to reflect their browser namespace.
workbox-cache-expiration➡️workbox-expirationworkbox-broadcast-cache-update➡️workbox-broadcast-update
This change only affects developers who bundle their service worker from npm dependencies. Developers who load Workbox using workbox-sw should not have to change their code. [#1879]
⚠️ Breaking Changes
workbox-expiration
- The underlying IndexedDB data model for cached entry metadata has changed from using IndexedDB database names that match the cache name (one database per cache name) to a single database named
workbox-expiration. If you had code that was manually inspected this metadata, you'll need to update it to check the new database [#1883].
🐛 What's Fixed?
workbox-window
workbox-windowscripts were not being copied when using thecopyLibrariesinworkbox-buildandworkbox-cli. This has been fixed [#1871].
workbox-expiration
- The
workbox-expirationdocumentation states that themaxAgeSecondsoption will expire entires based on the time they were last accessed. But due to a bug in the logic, it would actually expire entries based on the time they were originally cached. This has been fixed, and the behavior now matches the documentation [#1883].
workbox-build
-
After changes to
workbox-precachingin beta.1, using thenavigationFallbackoption inworkbox-buildwouldn't work if your fallback URL had precach metadata added to it. This has been fixed inworkbox-build, but anyone usingworkbox.routing.registerNavigationRoute()and passing it a precached URL will likely need to update their code to useworkbox.precaching.getCacheKeyForURL()as well::::js // This won't work anymore. workbox.routing.registerNavigationRoute(myPrecachedURL);
// Instead, do this: workbox.routing.registerNavigationRoute( workbox.precaching.getCacheKeyForURL(myPrecachedURL) );