-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove PWA installability requirement to have a Service Worker #34127
Conversation
@FormularSumo Is there a chromestatus or bug or similar that shows when the requirement for service worker disappeared from chrome? My thinking here is that a softer removal is needed than this (or some kind of compatibility info) if the release is relatively recent. So what is it that defines a PWA? Is it just the presence of a manifest file and being served over HTTPS? @wbamberg were you planning on looking at this? |
@@ -12,7 +12,7 @@ This intro-level tutorial walks through all the steps of building a basic progre | |||
|
|||
We will walk through the steps of building a fully functional web app, then progressively enhance CycleTracker to make it installable and to work even when the user is offline. | |||
|
|||
By default, PWAs are regular websites, built with the same technologies. Just like a regular websites, PWAs are linkable, discoverable via search engines, and visible in a browser. By including a manifest file and service worker, and serving the website over TLS, any website can become a PWA. | |||
By default, PWAs are regular websites, built with the same technologies. Just like a regular websites, PWAs are linkable, discoverable via search engines, and visible in a browser. By including a manifest file, and serving the website over TLS, any website can become a PWA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it comes down to what defines a PWA - if it is just a manifest file and serving a website over TLS, this is correct.
But I'd still consider having some note here about the service worker even if it isn't a requirement of being a PWA, it is a core feature of what makes PWAs actually useful.
I've tested this in Chrome and it's correct, we don't even need a minimal service worker for a website to be installable. Perhaps @captainbrosset might remember why we said it did :). I think this is a good PR although we should also address https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/What_is_a_progressive_web_app#technical_features_of_pwas. For that page, though, rather than just delete all the SW stuff we should soften the language, because SW are pretty fundamental to PWAs. So for example:
...could change to:
Yeah, although the manifest has a few mandatory keys AFAIK. I think this link ought to be the definitive description (on MDN anyway): https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable#installability.
https://web.dev/articles/install-criteria says it was last updated in 2020, so if we can believe that, we should be good. The js13kGames tutorial hasn't been properly updated since 2017, and doesn't really fit with the new content. I would just delete it personally, but it was decided we should keep it 🤷 . |
files/en-us/web/progressive_web_apps/tutorials/cycletracker/index.md
Outdated
Show resolved
Hide resolved
@FormularSumo What do you make of the comments, and in particular Will's suggestion to update https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/What_is_a_progressive_web_app#technical_features_of_pwas with a softer approach. IF you don't/can't take that on as part of this, I think we can merge and perhaps do that separately. |
I've not followed the most recent discussions on this topic since last year's TPAC when the idea of dropping the requirement for service workers to promote installability was discussed. Our (Edge's) docs still say that Service Workers are required: "For Microsoft Edge to be able to install the app, your app must have a service worker file." See https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/#step-5---add-a-service-worker I'll do the research and come back to this thread with an update as soon as I can. |
Because SW was a hard requirement for browsers to promote PWA installation.
100% agree with this, SW are very fundamental to PWAs, and to the web in general. For an installed PWA to feel "app-y", it really ought to handle offline well, and SW makes this possible. I'll take a read through the PR in a bit. |
I'm don't think I believe the PWA install criteria article when it says last updated 2020, I'm almost certain I remember service workers being a requirement when I was trying to make an app installable back in August 2022, and then finding it was no longer the case when I revisited the issue in January this year. I've also managed to find a blog post where Chrome talked about updating their instability criteria - https://developer.chrome.com/blog/update-install-criteria - apparently the service worker requirement was dropped in Chrome 108 (2022-11-29) for mobile and 112 (2023-04-04) for desktop. According to the article, a registered service worker was still needed to prompt for installation, but not to be installable, and they were working on changing that as well. Having just tested now my app which does not use/register any service workers does still get prompted for install in Chrome and Edge so I assume this must have also been dropped since. So I think it's safe to say that service workers aren't a requirement for installability now, just a correct manifest and https. A user engagement criteria is also needed for installation prompts (see the Chrome requirements), which is currently missing from any of the MDN pages so perhaps should be added in a separate PR. I see your point though about service workers and offline functionality still being important/highly relevant to PWAs, so I'm going to go through and update my PR to reflect this and make it a bit softer as you suggested. |
files/en-us/web/progressive_web_apps/guides/making_pwas_installable/index.md
Outdated
Show resolved
Hide resolved
…ality being an extension to a PWA. Also fix typo.
I've finished updating the pages now. I think it should make it clear that service workers/offline functionality is not a hard requirement, but definitely a sensible thing for a PWA to have. Let me know if you think it works. |
files/en-us/web/progressive_web_apps/guides/making_pwas_installable/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/progressive_web_apps/tutorials/cycletracker/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/progressive_web_apps/tutorials/cycletracker/manifest_file/index.md
Show resolved
Hide resolved
files/en-us/web/progressive_web_apps/tutorials/cycletracker/manifest_file/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/progressive_web_apps/guides/making_pwas_installable/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/progressive_web_apps/tutorials/cycletracker/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/progressive_web_apps/tutorials/cycletracker/secure_connection/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/progressive_web_apps/tutorials/cycletracker/secure_connection/index.md
Outdated
Show resolved
Hide resolved
…cure_connection/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much @FormularSumo (and @captainbrosset ). I've done a minor subedit. Merging.
Thanks for all the reviews and for merging the PR - it looks great now! |
Fixes #34124