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

Need to define how to apply the manifest #226

Closed
marcoscaceres opened this issue Jun 17, 2014 · 2 comments
Closed

Need to define how to apply the manifest #226

marcoscaceres opened this issue Jun 17, 2014 · 2 comments
Assignees
Labels

Comments

@marcoscaceres
Copy link
Member

With scope (#114) and service_worker (#161) being added to the manifest, and display mode, it becomes important to state when the actual manifest is applied to the documents of an origin.

@benfrancis
Copy link
Member

So far it seems that implementations of the Web Manifest specification are focused on the "install" or "add to homescreen" use case. For this use case the obvious time to apply the properties of the manifest would be at install time. One definition of "installing" a web app might be a user initiated process in which the app registers with the user agent as managing a particular URL "scope" separately from the browser, and optionally registers a "service_worker" to manage a certain URL scope, even while offline. The Service Worker might also run an "install" method to download resources of the app into an offline cache during installation.

In this model, all web content is by default browsed via the catch-all web browser app with full browser chrome. Installing an app can be thought of as an explicit user action to slice off a part of the web to use separately from the browser in its own app. Bookmarking a web page can be thought of as a separate but but complimentary action to installing a web app. An app is a collection of URLs within a defined URL scope which can be used separately from the browser and should use an app name and icon if provided in the manifest. A bookmark is a shortcut to a single page at a particular URL which may or may not be part of an installed web app. A bookmark should use the document title and icon of the web page rather than the manifest. If a bookmarked URL falls within the scope of an installed app then the user agent could optionally open the bookmark in the app.

The other alternative I've heard discussed is that the manifest is used as a progressive enhancement when simply loading a web page in a browser. The implication I think is that the manifest would be applied when loading the first web page which references the manifest. In this model the manifest would presumably also be applied to bookmarks.

The obvious challenge with applying the manifest on page load is that the manifest is likely to be downloaded after the web page has already started to render. Applying properties like "orientation" and "display" after the web page has already been rendered could be quite jarring for the user. In order to seamlessly navigate between pages of a web app without exiting its preferred display mode, the web app would presumably have to register a particular URL scope with the user agent without explicit intent from the user.

Another challenge with applying a manifest without installation is the ability for a web page to go "standalone" and therefore hide the URL bar, without the user ever seeing its URL or origin. On many platforms "installing" a web app implicitly implies a level of trust on the user's part in a particular app from a particular origin. Allowing a web app to enter standalone mode and conceal its URL from the user provides a vector for phishing attacks. It also potentially removes a level of control from the user regarding how they wish to access certain web content because it removes the explicit step of "installation" in which the user demonstrates their desire to use the content separately from the browser.

The ability to apply the properties of a manifest without installation doesn't seem to be essential in order to fulfil the requirements [1] for this specification, but do people have strong uses cases for this capability? If so, how could we solve the issues I describe above?

  1. http://w3c-webmob.github.io/installable-webapps/#requirements

@marcoscaceres
Copy link
Member Author

(just reading over this as I prepare to start work on manifest again... tl;dr: we are generally in agreement)

For this use case the obvious time to apply the properties of the manifest would be at install time.

For the install use case, the appropriate time is when the application is (re)started - through the means by which the OS signals to the user that the application is installed. In the case of Android, iOS, and even FxOS, that is by adding the icon to the homescreen and then the user pressing that icon: Upon the user pressing on the icon, the manifest is applied prior to the page being navigated - the display mode is applied, as is the orientation, then the page is navigated (content is loaded).

The ability to apply the properties of a manifest without installation doesn't seem to be essential in order to fulfil the requirements [1] for this specification, but do people have strong uses cases for this capability?

As we discussed in person, "progressive enhancement" was a miscommunication on my part (my apologies) - it was not to mean that the manifest would be progressively applied to the page. I was using it in the sense defined in Wikipedia:

"Progressive enhancement uses web technologies in a layered fashion that allows everyone to access the basic content and functionality of a web page, using any browser or Internet connection, while also providing an enhanced version of the page to those with more advanced browser software or greater bandwidth."

I primarily consider features to not be supported on the platform, so basically treat everything new we add to the platform as a polyfill (and hence a "progressive enhancement" where support is never guaranteed). In other words, in designing a feature, I just assume users are stuck on some old version of Firefox (or that other browser vendor simply decides they are not going to support this) and I imagine what the experience would be like for users. This is the reality with most standards, that even after 3-5 years those standards are not universally supported so some users are always missing out.

Anyway, right now, "apply on restart after install".

@marcoscaceres marcoscaceres added P1 and removed P2 labels Dec 16, 2014
@marcoscaceres marcoscaceres self-assigned this Dec 16, 2014
marcoscaceres pushed a commit that referenced this issue Dec 20, 2014
specified applying a manifest (closes #226)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants