*For a given URL, how should we determine whether it belongs to an app or should be opened in a browser window?*
This is a question that has come up recently in the Systems Front End team as we work on the new system browser and Rocketbar in Firefox OS. Chrome hosted apps define the scope of a hosted web app with a list of URLs with wildcards, in doing so they appear to allow multiple apps per origin and multiple origins per app [1]. Amazon web apps define the scope of an app by the location at which the app manifest is hosted on the server (e.g. a domain, subdomain or a subdirectory), this allows multiple apps per origin but only one origin per app [2]. Am I right in thinking that in Firefox OS we currently only allow one app per origin and one origin per app? If so, is origin a good enough indicator as to which app a URL belongs to? The Rocketbar allows you to search your browsing history. We would like this to include browsing history from inside apps as well as browser windows. But if you click on a history result, should you open it in an app window or a browser window? What if the same URL has previously been visited in both an app and a browser window? The current UX spec says to always open it in a browser window, but Jason pointed out that this could cause permission problems if the URL was originally loaded inside an app window as it may not get all the same permissions in a browser window without the mozapp attribute set. One proposal was to identify which app a URL belongs to by its origin, but this assumes one app per origin and Fabrice pointed out that we may want to support multiple apps per origin in future. Do we have any concrete plans for how that would work? Is using origin a good enough indicator until such a point as we define something more granular in the future, if ever? *Should we open all off-origin hyperlinks from an app in a new browser window instead of the current app window?* Currently in Firefox OS as I understand it you can load any URL in any app window. If you follow a hyperlink inside an app which doesn't specify target=_blank it will open in the current app window, not the browser app. This could mean for example that if you follow a link to a news article on a news web site from a social app it might open in the app window of the social app rather than in the browser app. Apparently this is a common source of review rejections in the Firefox Marketplace because it provides a bad user experience, particularly if the user can't go back. It would also currently mean that the news article would be not be recorded in your browser history so you couldn't get back to it later. Should we just open all hyperlinks to another origin outside of the app window? Ben 1. https://developers.google.com/chrome/apps/docs/developers_guide 2. https://developer.amazon.com/post/Tx1VQ8CDCS8T3O2/Creating-and-Updating-your-Web-App-Manifest.html _______________________________________________ dev-webapps mailing list [email protected] https://lists.mozilla.org/listinfo/dev-webapps
