Skip to content
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

Update support for installing non-PWA sites #34336

Merged
merged 4 commits into from
Jul 7, 2024

Conversation

FormularSumo
Copy link
Contributor

@FormularSumo FormularSumo commented Jun 21, 2024

As of 124, Chrome now supports installing any site as an app. See here as well.

In my testing this works on both desktop and mobile. On desktop the wording is "install site as app" rather than "install [site name in manifest]", but otherwise works the same. On mobile the install pop-up has a more generic "install app" title and UI rather than the rich install UI of a PWA (which can be with/without screenshots), but it still creates a webAPK that functions like a PWA.
Screenshot_20240621-235441
Screenshot_20240621-235459

Interestingly unlike a PWA it has a Chrome bar at the top a bit like if it were in an-app browser, but other than that it seems to act the same.
Screenshot_20240621-235427

I tested in Edge to double check, but trying to add a non-PWA site to the homescreen just creates a bookmark that launches the site in Edge, which was the old behaviour of Chrome before they made this change.

I've also updated the text for iOS browsers as I believe that all iOS browsers support installing sites as apps given it's part of the system share menu and a feature of WKWebView which they all use. Certainly all the ones I've tried (Firefox, Chrome, Edge, possibly more) do.

@FormularSumo FormularSumo requested a review from a team as a code owner June 21, 2024 23:04
@FormularSumo FormularSumo requested review from hamishwillee and removed request for a team June 21, 2024 23:04
@github-actions github-actions bot added Content:PWA Progressive Web Apps content size/xs [PR only] 0-5 LoC changed labels Jun 21, 2024
Copy link
Contributor

github-actions bot commented Jun 21, 2024

Preview URLs

(comment last updated: 2024-07-06 00:03:05)

@FormularSumo
Copy link
Contributor Author

I decided to double check installing non PWAs on iOS and it turns out that no browsers let you do it. Still using Wikipedia as an example, all of them let you add to homescreen from the share menu, but all that does it creates a shortcut which opens in your default browser. So pretty similar behaviour to most Android browsers (eg Edge and Firefox) barring Chrome now.

@FormularSumo
Copy link
Contributor Author

FormularSumo commented Jun 21, 2024

I unfortunately can't easily test Safari on macOS, but my understanding is that there's no install prompts and it installs all sites the same regardless of PWA support, which includes launching in a separate window, adding to the launchpad and dock and generally acting like an app. I don't know how well it integrates with other system features like screen time or battery usage, but I'd guess not any worse than other macOS browsers or iOS (which doesn't do this that well). If so I think it's probably valid to say that Safari for desktop does support PWAs. Install prompts aren't strictly necessary for this to be true - eg Firefox for Android does not support install prompts but is still listed as supporting PWAs. On this page as well we refer to Safari as supporting PWAs so it'd be good to be consistent.

@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Jun 21, 2024
@FormularSumo
Copy link
Contributor Author

I've updated it to say that Safari does support PWAs. I've also linked to the extension for Firefox as in the installing PWAs article so they now match each other.

Chrome 124 now supports installing any site as an app. I also believe that all iOS browsers support installing sites as apps as it's part of the share menu and a feature of WKWebView.
- Firefox and Safari do not support installing PWAs on any desktop operating systems. See [Installing sites as apps](#installing_sites_as_apps), below.
- Chrome and Edge support installing PWAs on Linux, Windows, macOS, and Chromebooks.
- Chrome, Edge & Safari support installing PWAs on all supported desktop operating systems.
- Firefox only supports installing PWAs on desktop with an [unofficial extension](https://addons.mozilla.org/en-US/firefox/addon/pwas-for-firefox/).
Copy link
Collaborator

@wbamberg wbamberg Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I like the reference to the Firefox extension. It's not official (as you say) or very widely used, and I'm not sure how referencing it really helps web developers. And it gives the docs a chance to be out of date or even dangerous if the extension stops getting support or turns out to have problems.

IMO we should just say it's not supported by Firefox.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wbamberg Yes ^^^.

Note, I haven't given up on reviewing this, just trying to clear my FF release stuff first. Feel free to update and merge it as you like, because I'm still trudging through the list.

What I want to do with this is the work to more loosely define what a PWA is and better capture app installability options. But those are bigger jobs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't think we should list Safari as "supports installing PWAs". Safari support for installing sites is exactly what #30875 was designed to accommodate (see also #30463 (comment)), and I don't see any good reason to reconsider this here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I proposed a fix above.

The separate concepts we want to capture are manifest installation and app installation - a PWA can use either, but the manifest provides the best app-like experience.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what's in the page now is entirely correct and reflects the "model" of the docs that the authors had in mind. I don't think any actual new information has emerged wrt Safari (i.e. we already knew that Safari supported installing any site) and what is/was known is already explicitly accommodated in the page. So I think we should leave it as is.

Firefox and Safari do not support installing PWAs on any desktop operating systems. See Installing sites as apps, below.
...

Safari for desktop and mobile, and Edge for desktop also support installing any website as an app. However, this is not specific to PWA because the site doesn't need to meet the installability criteria described in this guide, and because the browser doesn't proactively promote the site for installation.

I don't know what the point is of adding more hedging about the manifest in here. But, I won't argue about it any more if you think it should be in. As i said already, I don't think arguing about exactly what defines a PWA is very productive.

Copy link
Collaborator

@hamishwillee hamishwillee Jul 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly enough to make modifications the way I'd like without support. I'm OK to close the whole PR.

Though we should do this bit https://github.com/mdn/content/pull/34336/files#r1650338836 - since Chrome now supported for apps as well.

@FormularSumo
Copy link
Contributor Author

I'm happy to remove the reference to the Firefox extension given it's unofficial. Like I said before I was doing it mainly because it's mentioned in this article - "Firefox requires a PWA extension." - to make them consistent.

Fair enough also if you wouldn't define Safari desktop as having PWA support. My reasoning for going with yes is that again it's also mentioned in that article - "Before macOS 14 (Sonoma), PWAs could be installed on macOS from any browser except Safari. The opposite is true for iOS versions before 16.4, where PWAs could only be installed in Safari. PWAs can be installed on macOS 14.0 or later and iOS/iPadOS 16.4 or later from any supporting browser.", and I was more focused on whether the installed site acted like an app rather than if it met the promote for installability requirements. Going back to my Firefox for Android example while it doesn't support onbeforeinstall it does have an install button only for PWAs so I guess that makes sense, whereas Safari desktop doesn't seem to be doing any differentiation based on the manifest file / https etc.

As for the Chrome changes and Safari mobile not supporting installing any site as an app, I think they're important to keep in. I like your suggestions @hamishwillee I think they fix all of the above and make it more clear what the difference is between PWA installation (meeting the criteria for promotion for installability) and installing other websites.

Remove reference to unofficial Firefox PWA extension, Safari desktop does not support PWA manifest installation, better explain the difference between installing with a manifest file and without.

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @FormularSumo

FYI @wbamberg As we discussed offline last week, some might argue there is no such thing as a PWA that does not have a manifest (since it's a marketing term without a spec, you can pretty much argue anything). That would make the first sentence a tautology to those readers.

I'm going to merge it though, because I think it makes the difference between the two application installation mechanisms very clear and captures that you can have very PWA-like behaviour in an app without it having the manifest.

@hamishwillee hamishwillee merged commit b6881ac into mdn:main Jul 7, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:PWA Progressive Web Apps content size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants