Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions sites/docs/src/content/platform-integration/web/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,21 +206,18 @@ you can configure your cache headers as follows,

### How do I configure a service worker?

The service worker generated by `flutter build web` is deprecated,
and you can disable it by setting the `--pwa-strategy` flag to `none`
when running the `flutter build web` command.
Flutter no longer generates or manages a service worker by default.

```console
flutter build web --pwa-strategy=none
```
If your application requires offline support or advanced caching,
you need to configure a service worker yourself using standard
web tooling or third-party solutions such as [Workbox][workbox].

If you would like to continue to use a service worker, you can
[build your own][using-service-workers] or try third-party tools
such as [Workbox][workbox].
For more information on building custom service workers,
check out [Using service workers][].

If your service worker is not refreshing,
configure your CDN and browser cache by setting
the `Cache-Control` header to a small value such as 0 or 60 seconds.
If your service worker is not refreshing, configure your CDN and
browser cache by setting the `Cache-Control` header to a small
value such as 0 or 60 seconds.

[building a web app with Flutter]: /platform-integration/web/building
[Creating responsive apps]: /ui/adaptive-responsive
Expand All @@ -235,7 +232,7 @@ the `Cache-Control` header to a small value such as 0 or 60 seconds.
[Preparing a web app for release]: /deployment/web
[roadmap]: {{site.github}}/flutter/flutter/blob/master/docs/roadmap/Roadmap.md#web-platform
[run your web apps in any supported browser]: /platform-integration/web/building#create-and-run
[using-service-workers]: https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers
[Using service workers]: https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers
[Web content in Flutter]: /platform-integration/web/web-content-in-flutter
[Web support for Flutter]: /platform-integration/web
[web workers]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers
Expand Down
Loading