-
Notifications
You must be signed in to change notification settings - Fork 13
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
Enable developers to know if a web app has been installed #42
Comments
Use Case 1: Web apps are currently forced to deliver the same content and scripts to all users and cannot vary those based on whether the app is installed. For example, they may choose not to include the content and images advertising the availability of their app in an app catalog if they know it is already installed on this device. Use Case 2: (via @dmurph) Established properties use server-side logging frameworks for metrics and experiments, and it is really difficult to pipe back data from JavaScript on the client to join with the server side logs to know 'is this user viewing the site as a webapp?'. Providing this information as a Client Hints unblocks these sites from putting major resources towards webapps because they can now run experiments to determine things like "relation between user satisfaction / retention and web app usage." Use Case 3: (via @hrantabelyan) Serving different layout/content based on installation status, for example excluding footer or displaying different content in header—it's not about show/hide something, that's possible on client side—but we also don't want to make DB queries for that layout/content that DB query is not something complex for the case that we have right now, but imagine if it's something with multiple SQL DB joins and/or heavy API calls. Use Case 4: (via @comp615) When an app catalog-installed PWA is launched by clicking a link from another web property—and the link is captured and redirected into the app—the |
Thinking in terms of the display-mode client hint solving these: @aarongustafson said:
Is it a non-starter if they are shown when the site is opened in a tab? If the site requires an install to function properly, then the UX will still need to show up if the user opens in a tab instead of in the desired app display mode. I see one use-case here that display mode client hints doesn't solve as "We want users to know they can install the app, but we don't want to force them".
I believe this is solved by display mode client hints.
I believe this is solved by display mode client hints, and perhaps better! If the user views the web content in the tab, the developer would, I imagine, want to serve UX that is suited to a browser experience instead of the windowed experience.
I'm less familiar with this case - but is this stardarized? Is this solved by the url handlers project? This doesn't seem like a use-case as much as way to possibly expose this? I'm a little confused. |
We are considering an "isInstalled" DOM flag as well. I don’t see any reason why providing this in a tab would be problematic. Some apps may not choose to link capture and may be ok with their app living in either a tab or a standalone window (or both).
At present there is at least one major issue with relying on display mode as an indicator if installation: fullscreen. Right now, if you put an app in fullscreen using the DOM API, the display mode setting collected via matchMedia is the same as if the app was a "fullscreen" pwa. This may not be the only isolated instance going forward. While it may be possible that display mode may be useful for some apps to inform their delivery, it seems like it would not cover all cases (especially when red herrings like "fullscreen" exist). If someone wants to make decisions based on whether the app is installed or not, they should be able to query that explicitly rather than relying on a proxy like display mode.
It’s non-standard at present, but may become a de facto standard (since app catalogs are not—presently—considered to be implementors). Edge is doing this for Store-installed PWAs. The Play Store does something similar with TWAs (and we are trying to get them to align on the format). We have also approached Samsung about doing the same with their TWAs.
No. URL Handlers would handle the redirection into the PWA (and cause the true Referer to be passed). They would not present any info about whether the app was installed.
We have some partners who are using the app catalog-derived |
Use case 4: Got it (regarding the referer). This doesn't seem like a 'use case' to me as much as an unreliable signal for installed - is that right? Could we design that app catalog API so that the site would continue to work if it was uninstalled? Use case 2: Fullscreen - seems to be what we want for differential rendering (rendering for a given display purpose). Regarding metrics, the server-side logging framework case, that partner actually explicitly wanted display mode, not installed - they want to know which UX experience their users were using, so fullscreen made sense, and having Questions about 1 and 2 and 3: How would this behavior change if the site was installed, but showing in a tab? Would the behavior want to be the same as 'not installed'? Regarding this signal in general, I have voiced in the past the view that we should avoid giving a reliable signal here, as it would be bad for users if web sites have a way to force users to install their web sites. Especially if user agents initiate OS integration with installation, or make decisions based on installation status. Use Case 5: App catalogs need a way to differentiate between "Install" and "Open" if the app is already installed. I'm not sure how we would get around that without exposing this information to the app catalog. |
It’s another inference (like display mode) that indirectly indicates installation, but is unreliable. I brought it up because it creates a gap.
The site would always work, regardless. The
To be clear, I am not saying there’s no value in knowing the display mode. There absolutely is. If that’s the signal that gets you the info you need to make an informed decision about rendering, resources, etc. that’s awesome. I am saying that if someone wants to make a similar decision gated specifically on the question of installation, display mode may seem like an attractive (and often accurate) proxy, but it isn’t the same thing as being explicitly told your site has been installed.
As with so many things, it will depend on the specific adjustments someone is making…
To be clear, I am not advocating that “web sites have a way to force users to install their web sites.” I agree it’s possible that an app developer might use a dark pattern wherein they did not allow sign-in without installation, but I don’t see much of a difference between that and sites that force you to accept certain permissions in order to use them (which is also currently possible). My sense is that approach would backfire in a similar way and they’d change their behavior to not create lock-in.
I’m not sure I follow. Could you expand on this?
This is something else we’re trying to figure out, to be honest. I don’t think there’s a way to do it without the catalog itself having knowledge of (or potentially being able to detect) the installation status of a given app. The various ideas I’d considered are (to the best of my recollection):
To truly avoid the potential privacy violation, we could just have the link be a link to the app and recommend the text be "Install / Launch" :-) |
Limited to just Android, a site |
Yes, you can use |
Right. It would help with Use Case 1, though, where it's purely about delivery:
|
Interesting. Thanks for that info @tomayac. I wasn't aware gIRA had that capability. Unfortunately, gIRA is client side only, so we still need the Client Hint for server side, but it sounds like we don't need to add another DOM API. |
If implemented as a client hint, wouldn't the information be sent to any 3rd-party origin as well? A DOM API feels more appropriate to me. Also there's no need to send the information repeatedly anywhere if nobody is asking for it. |
No. It would only be sent to the I imagine you’re asking about 3rd parties in terms of being able to know, as a catalog, if an app has been installed already. There are valid reasons we’d like to find a solution for this, however, there are serious privacy implications. There might be a way to build an allow-list within the Manifest (or maybe via a file in |
We’ve gotten signal that some developers have an interest in making adjustments to their content and/or resource payload based on installation status. Currently, folks are relying on querying "display mode" on the client side as a proxy, but display mode does not indicate installation status (e.g., a "fullscreen" display mode is indicated even if the site was put in fullscreen mode via the JavaScript API.
This issue thread is intended to catalog the use cases folks have for wanting to know about installation status.
Related: #32 and w3c/manifest#977
The text was updated successfully, but these errors were encountered: