@@ -68,6 +68,7 @@ You can find the most recent version of this guide [here](https://github.com/fac
68
68
- [ Getting Started with Storybook] ( #getting-started-with-storybook )
69
69
- [ Getting Started with Styleguidist] ( #getting-started-with-styleguidist )
70
70
- [ Making a Progressive Web App] ( #making-a-progressive-web-app )
71
+ - [ Opting Out of Caching] ( #opting-out-of-caching )
71
72
- [ Offline-First Considerations] ( #offline-first-considerations )
72
73
- [ Progressive Web App Metadata] ( #progressive-web-app-metadata )
73
74
- [ Analyzing the Bundle Size] ( #analyzing-the-bundle-size )
@@ -1562,6 +1563,8 @@ The service worker will use a [cache-first strategy](https://developers.google.c
1562
1563
for handling all requests for local assets, including the initial HTML, ensuring
1563
1564
that your web app is reliably fast, even on a slow or unreliable network.
1564
1565
1566
+ ### Opting Out of Caching
1567
+
1565
1568
If you would prefer not to enable service workers prior to your initial
1566
1569
production deployment, then remove the call to ` serviceWorkerRegistration .register ()`
1567
1570
from [` src/ index .js ` ](src/index.js).
@@ -1571,7 +1574,8 @@ have decided that you would like to disable them for all your existing users,
1571
1574
you can swap out the call to ` serviceWorkerRegistration .register ()` in
1572
1575
[` src/ index .js ` ](src/index.js) with a call to ` serviceWorkerRegistration .unregister ()` .
1573
1576
After the user visits a page that has ` serviceWorkerRegistration .unregister ()` ,
1574
- the service worker will be uninstalled.
1577
+ the service worker will be uninstalled. Note that depending on how ` / service- worker .js ` is served,
1578
+ it make take up to 24 hours for the cache to be invalidated.
1575
1579
1576
1580
### Offline-First Considerations
1577
1581
0 commit comments