{"section":"tutorials","requestedLocale":"en","requestedSlug":"how-to-install-a-service-worker","locale":"en","slug":"how-to-install-a-service-worker","path":"docs/en/tutorials/storefront/store-settings---storefront/how-to-install-a-service-worker.md","branch":"main","content":"Service Worker is a script that your browser runs in the background, separate from the Web, enabling features such as periodic synchronization, push notifications and even running offline.\n\nTo create the script, follow the step-by-step instructions below:\n\n1. In the VTEX Admin, go to **Store Settings > Storefront > Checkout**, or type **Checkout** in the search bar at the top of the page.\n2. Click the <i class=\"fas fa-cog\"></i> icon of the desired site.\n3. In the `Code` tab, click the `New` buttton.\n4. Then click on `File`.\n5. Fill in the file name exactly like: `service-worker.js`.\n6. Click the `Create` button.\n7. Set the feature.\n8. Click the `Save` button.\n\nAlthough the file is in `/files/service-worker.js`, it receives the `Service-Worker-Allowed` header with the value `/`, which allows you to intercept requests from the site root.\n\nFor more information, see Google Developers [Web Fundamentals](https://developers.google.com/web/fundamentals/primers/service-workers/).\n\n### Related articles\n\n- [How to turn my store into a PWA](/en/docs/tutorials/how-to-turn-my-store-website-into-a-pwa)"}