You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And unlike JSON, it supports comments, internationalization and doesn't invalidate entire file because of a single trailing comma :)
<metaname="application-name" name="My App" lang="en"><metaname="application-name" name="Moja Apka" lang="pl"><!-- I can comment things without breaking syntax, wow such amaze --><linkrel=iconhref="es.png" hreflang=es><!-- text in the icon? No problemo! -->
Ideally, we should only accept favicons that follow the specifications suggestion. <link rel=”shortcut icon” sizes=”128x128” href=”niceicon.png”> [http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#rel-icon]
Meta tags are easy to (ab)use as they are simple to add, so adding one for Chrome is not very invasive. I understand why they choose that, when it is not standardized.
For instance with viewport, some browser vendors implemented ; as separator because they though it was working as such on Safari, but safari just ignores trailing "trash"
Of course there's nothing stopping anybody from using any new unregistered name, but OTOH that doesn't stop manifest spec from using existing well-defined names.
<meta viewport> is a failure of standardization indeed, but that's more of specific issue with Apple's lack of effort to standardize it early and W3C's too late reaction. If the manifest spec defines <meta> values from the start, then vendors won't have to reverse-engineer and second-guess the syntax, so this problem is entirely avoidable.
I suggest, at very least, that the manifest spec should define as many properties as possible in terms of existing <meta> or <link> values, e.g. instead of defining name property from scratch it should define name as being alias for <meta name=application-name>.
Regardless of whether the manifest spec will reinvent its own properties or refer to existing meta tags, somebody will have to define what happens when a page uses both manifest name and meta application-name, etc., so addressing this in the manifest spec from the start may be best for interoperability.
@pornel I agree. The spec should provide fallback for all things it overwrites explicitly (and makes sure that it falls back to HTML when stuff is missing). At the same time, it might also be important to make sure meta equivalents are provided in HTML for new things the manifest format introduces (e.g., some solution for orientation hinting).
With JSON we have the benefit that is can be easily created (more easy and slightly cleaner than HTML) which is good for online stores (like what Moz is attempting).
Having worked on translation before, having all the worlds languages in the manifest is going to show down loading and parsing of the data, if not introduce corruptions once in a while due to wrong encoding etc. An online store etc could just generate another json given the user language and it ties nicely in with ServiceWorker.
@kenchris Every dynamic web page by definition has ability to create HTML.
As for "clean", I wonder whether draconian (and otherwise unspecified) JSON error handling will hold long-term. It's a prisoner's dilemma. It happened to HTML and RSS already: as the format gets more popular, inevitably there will be slightly syntactically broken files, and when any major consumer starts accepting these, everybody will have to. It starts happening to JSON already.
Lack of good i18n in JSON is indeed a problem. HTTP language negotiation or JS-initiated ServiceWorkers are not easily discoverable by crawlers.
I have to agree with @marcoscaceres and @pornel on this one, manifest files have felt very wrong since moz introduced theirs. Another benefit of using standard html tags is that a user agent can intelligently upgrade an "almost web-app" to a web-app. Makes bookmarking to homescreen much easier when there is 1 identification process.
While it indeed is possible to implement pretty much all functionality offered by the manifest in HTML tags, I'd like to note a few benefits I see in the approach of using an external manifest.
1) External manifest files can be cached.
Marcos' example lists five lines of and elements which replicate the behavior specified in the manifest. The manifest is 164 bytes long, the HTML approach 241 bytes. While the difference is negligible, all of the information is static to the website and does not change for page-to-page.
We're talking about adding four or five more meta tags for being able to customize some of the aspects of Chrome for Android's add-to-homescreen feature, namely for being able to modify the title, setting a launch URL, and so on.
The problem here is the naming. Do we introduce a name consistent to the current naming (mobile-web-app-capable), support Apple's scheme (apple-mobile-web-app-title) or go for Facebook's Open Graph (og:title)? Twitter has their own tag (twitter:title) for Twitter cards as well. In every case, we're talking about introducing yet another tag developers will have to send with each of their pages.
More advanced web applications will have to send a ton of properties for Chrome, a ton of properties for Safari, perhaps yet another format for Mozilla or IE, meta information to be used on Twitter cards and more meta information to be used on Facebook and Google+ references. This strongly advocates the need for UA-sniffing, which unfortunately is something most large players are already forced to do.
Externalizing this data solves the problem of having to send it with every page. Standardizing the properties within the manifest solves the problem of everyone doing their own thing by providing a canonical source of the information.
2) Values can be objects or arrays rather than just strings.
This solves the problem of the awkward and highly inconsistent formats the values of tags are currently using, especially when the tag's value can contain several sub-values (icons, viewports, notification-bar settings).
For example, say that the New York Times wants to reference their native applications in the various stores. Using tags, you would end up with something like:
Instead, you could refer to them in the manifest by specifing them in a simple map containing whatever meta data a vendor would like to be able to support:
It feels a bit more verbose due to the larger number of lines (but in fact has less bytes), but is easier to parse and extend.
In regards to JSON's draconian error handling, and also on the subject of not having the ability to comment in manifests, I really think this is something we should just try to fix in JSON. I know all current parsers will reject this (aside of eval()), but the longer we wait with introducing it harder it will be to change it. It's out of scope for this discussion, however.
@marcoscaceres Whilst these bugs exist on the Chromium bug tracker, they are suggestions and no decision has been made yet about how Chrome for Android will implement support for additional icons, titles and so on.
gzip eliminates cost of markup overhead in both cases, but you're right that it could lead to duplication on subpages. How about reusing manifest-specific <meta> from another page (which will likely be cached)?
This way you could reuse app metadata of your homepage for convenience and likely bandwidth saving thanks to caching, or if that is not appropriate for some reason, generate a dedicated file.
More advanced web applications will have to send a ton of properties for Chrome, a ton of properties for Safari, perhaps yet another format for Mozilla or IE
We're developing a standard here, so if we succeed authors will only need to set properties once for all browsers (we can set standard meta names without switching to another format).
Values can be objects or arrays rather than just strings.
Indeed, deeply nested arrays/properties are awkward in <meta>/<link>. However, equivalent to top-level array is simple and usually there's a way to avoid deep nesting. In this particular case I'd suggest:
Is it not possible to have an external HTML fragment with lots of meta tags that's imported in, so it looks
like HTML but has the single-fetch advantage? (Sounds a bit HTML imports-like, but I don't know web components deeply enough to know if this is similar). Would perhaps be slightly bigger than JSON but it's familar syntax, familiar names,allows comments and is fetched once then cached.
We've removed name and icons from the manifest. There is now nothing in the manifest that overlaps with what HTML provides, so this problem goes away (for now, at least).
After discussions with @sicking, I've put name and icons back into the spec. The fallback model is:
If name and/or icons in manifest, use those. Ignore the HTML ones.
If either name or icon are missing, fallback to HTML.
In 2, it's RECOMMENDED devs and implementors choose "application-name" and <link rel=icon> over proprietary stuff, of course.
It's personally not what I think is ideal (I preferred no name or icons in the manifest), but it's a fair compromise. And there may be some benefits to having name and icon in the manifest: centralization and manifest-based updates to the metadata, so devs can update their icons and the apps name (though we still need a security model for that, as if it happens automatically an app can change itself to look like another app... Which would be bad).
At least now we can move forward onto more interesting problems.
@matthewp Lack of backwards compatibility doesn't seem like a good motivation to adopt a new technology. Manifest should be adopted because it's a better solution.
what @pornel said. It should be ok, but it might mean that we don't end up with good support for application-name and link rel=icon on the platform. Anyway, let's see how this plays out over the next 2 years. Still a long road ahead before any of this becomes a reality.
Once we see the manifest spec being successful, I think we should make the HTML spec specifically mark the application-name as deprecated and encourage authors to use the manifest instead. Not sure if the same makes sense for icons since the icons is also displayed in the URL-bar in most UAs.
@marcoscaceres I think this issue must open again for these reasons:
If devs want to have SSR web app (server-side rendering) they must accept that nobody wants to add an app to the home screen that shows browser errors in no internet situation. Manifest is part of PWA and one key purpose is not just app work offline by old caches but works offline natively (CSR client-side rendering). To achieve this, devs must handle lots of logic like routing, ... and best way to implement these needs always start apps with specific main.html file in any URL and browser can cache it once for start app in any URL by that file.
As you mention above for security reason (app introduce itself to look like another app) and browser force serve PWA apps over TLS protocol and a certificate for TLS protocol belong to a domain, not URL, a domain can't set more than one app shortcut, so we just need one main HTML file. So for the future, we must just read the app name and icon from certificate, not from the manifest or main.html file.
And also I think register another app logic process as service-worker also is a huge mistake in web standard due to just register one main.js to start an app is enough and devs can write the logic in desired order to handle everything.
I propose this way to tell the browser that our app can be PWA (or just has CSR ability)
By above CSR standard propsal that indicate a main.html file to render all URL, we also able to write a compiler to compile web apps to native OS apps easily.
(p.s. We consider to continue this approach, not use any manifest file and make a compiler like Flutter but in HTML standards, not complete new languages.)
Last but not least as lots of good face HTML specification never get standard like @apply in CSS, Editors must be brave to abandoned manifest.webmanifest file from specification and introduce main.html before it's too late and uses some meta and link tags.
Activity
marcoscaceres commentedon Dec 6, 2013
Chrome for Android is moving to support more of the above HTML elements as fallback and don't rely on a manifest.
For example, this bug adds support for
application-name:https://code.google.com/p/chromium/issues/detail?id=323307
This one adds support for using HTML's rel="shortcut icon":
https://code.google.com/p/chromium/issues/detail?id=296962
kenchris commentedon Dec 6, 2013
One concern is the parsing of the content attribute of the meta tag, which is not really standardized and very quirky in current implementations.
kenchris commentedon Dec 6, 2013
Meta tags are easy to (ab)use as they are simple to add, so adding one for Chrome is not very invasive. I understand why they choose that, when it is not standardized.
kenchris commentedon Dec 6, 2013
For instance with viewport, some browser vendors implemented ; as separator because they though it was working as such on Safari, but safari just ignores trailing "trash"
kornelski commentedon Dec 6, 2013
The HTML spec or the manifest spec can define parsing rules for relevant
<meta>values.The HTML spec defines some basic values and defers to a a registry with links to specs for other
<meta>values.Of course there's nothing stopping anybody from using any new unregistered name, but OTOH that doesn't stop manifest spec from using existing well-defined names.
<meta viewport>is a failure of standardization indeed, but that's more of specific issue with Apple's lack of effort to standardize it early and W3C's too late reaction. If the manifest spec defines<meta>values from the start, then vendors won't have to reverse-engineer and second-guess the syntax, so this problem is entirely avoidable.kornelski commentedon Dec 6, 2013
I suggest, at very least, that the manifest spec should define as many properties as possible in terms of existing
<meta>or<link>values, e.g. instead of definingnameproperty from scratch it should definenameas being alias for<meta name=application-name>.Regardless of whether the manifest spec will reinvent its own properties or refer to existing meta tags, somebody will have to define what happens when a page uses both manifest
nameand metaapplication-name, etc., so addressing this in the manifest spec from the start may be best for interoperability.marcoscaceres commentedon Dec 9, 2013
@pornel I agree. The spec should provide fallback for all things it overwrites explicitly (and makes sure that it falls back to HTML when stuff is missing). At the same time, it might also be important to make sure
metaequivalents are provided in HTML for new things the manifest format introduces (e.g., some solution for orientation hinting).marcoscaceres commentedon Dec 9, 2013
I'll also note that if we reuse the HTML meta names, as @pornel suggests, we save a lot of bikeshedding.
kenchris commentedon Dec 9, 2013
With JSON we have the benefit that is can be easily created (more easy and slightly cleaner than HTML) which is good for online stores (like what Moz is attempting).
Having worked on translation before, having all the worlds languages in the manifest is going to show down loading and parsing of the data, if not introduce corruptions once in a while due to wrong encoding etc. An online store etc could just generate another json given the user language and it ties nicely in with ServiceWorker.
kornelski commentedon Dec 9, 2013
@kenchris Every dynamic web page by definition has ability to create HTML.
As for "clean", I wonder whether draconian (and otherwise unspecified) JSON error handling will hold long-term. It's a prisoner's dilemma. It happened to HTML and RSS already: as the format gets more popular, inevitably there will be slightly syntactically broken files, and when any major consumer starts accepting these, everybody will have to. It starts happening to JSON already.
Lack of good i18n in JSON is indeed a problem. HTTP language negotiation or JS-initiated ServiceWorkers are not easily discoverable by crawlers.
matthewp commentedon Dec 12, 2013
I have to agree with @marcoscaceres and @pornel on this one, manifest files have felt very wrong since moz introduced theirs. Another benefit of using standard html tags is that a user agent can intelligently upgrade an "almost web-app" to a web-app. Makes bookmarking to homescreen much easier when there is 1 identification process.
brucelawson commentedon Dec 12, 2013
What about the desire people have for an external manifest file? (Why would they want to?)
beverloo commentedon Dec 12, 2013
While it indeed is possible to implement pretty much all functionality offered by the manifest in HTML tags, I'd like to note a few benefits I see in the approach of using an external manifest.
1) External manifest files can be cached.
Marcos' example lists five lines of and elements which replicate the behavior specified in the manifest. The manifest is 164 bytes long, the HTML approach 241 bytes. While the difference is negligible, all of the information is static to the website and does not change for page-to-page.
We're talking about adding four or five more meta tags for being able to customize some of the aspects of Chrome for Android's add-to-homescreen feature, namely for being able to modify the title, setting a launch URL, and so on.
The problem here is the naming. Do we introduce a name consistent to the current naming (mobile-web-app-capable), support Apple's scheme (apple-mobile-web-app-title) or go for Facebook's Open Graph (og:title)? Twitter has their own tag (twitter:title) for Twitter cards as well. In every case, we're talking about introducing yet another tag developers will have to send with each of their pages.
More advanced web applications will have to send a ton of properties for Chrome, a ton of properties for Safari, perhaps yet another format for Mozilla or IE, meta information to be used on Twitter cards and more meta information to be used on Facebook and Google+ references. This strongly advocates the need for UA-sniffing, which unfortunately is something most large players are already forced to do.
Externalizing this data solves the problem of having to send it with every page. Standardizing the properties within the manifest solves the problem of everyone doing their own thing by providing a canonical source of the information.
2) Values can be objects or arrays rather than just strings.
This solves the problem of the awkward and highly inconsistent formats the values of tags are currently using, especially when the tag's value can contain several sub-values (icons, viewports, notification-bar settings).
For example, say that the New York Times wants to reference their native applications in the various stores. Using tags, you would end up with something like:
Instead, you could refer to them in the manifest by specifing them in a simple map containing whatever meta data a vendor would like to be able to support:
It feels a bit more verbose due to the larger number of lines (but in fact has less bytes), but is easier to parse and extend.
In regards to JSON's draconian error handling, and also on the subject of not having the ability to comment in manifests, I really think this is something we should just try to fix in JSON. I know all current parsers will reject this (aside of eval()), but the longer we wait with introducing it harder it will be to change it. It's out of scope for this discussion, however.
@marcoscaceres Whilst these bugs exist on the Chromium bug tracker, they are suggestions and no decision has been made yet about how Chrome for Android will implement support for additional icons, titles and so on.
kornelski commentedon Dec 12, 2013
Thanks @beverloo, these are good arguments.
gzip eliminates cost of markup overhead in both cases, but you're right that it could lead to duplication on subpages. How about reusing manifest-specific
<meta>from another page (which will likely be cached)?This way you could reuse app metadata of your homepage for convenience and likely bandwidth saving thanks to caching, or if that is not appropriate for some reason, generate a dedicated file.
We're developing a standard here, so if we succeed authors will only need to set properties once for all browsers (we can set standard meta names without switching to another format).
Indeed, deeply nested arrays/properties are awkward in
<meta>/<link>. However, equivalent to top-level array is simple and usually there's a way to avoid deep nesting. In this particular case I'd suggest:For more complicated cases I suggested extending
<meta>.brucelawson commentedon Dec 12, 2013
Is it not possible to have an external HTML fragment with lots of meta tags that's imported in, so it looks
like HTML but has the single-fetch advantage? (Sounds a bit HTML imports-like, but I don't know web components deeply enough to know if this is similar). Would perhaps be slightly bigger than JSON but it's familar syntax, familiar names,allows comments and is fetched once then cached.
14 remaining items
matthewp commentedon Feb 11, 2014
Hey @marcoscaceres I read the TAG thread and didn't get a clear answer on how this will proceed.. Mind summarizing?
marcoscaceres commentedon Feb 11, 2014
We've removed name and icons from the manifest. There is now nothing in the manifest that overlaps with what HTML provides, so this problem goes away (for now, at least).
matthewp commentedon Feb 11, 2014
Sweet! Thanks for taking charge on this.
marcoscaceres commentedon Feb 14, 2014
After discussions with @sicking, I've put name and icons back into the spec. The fallback model is:
In 2, it's RECOMMENDED devs and implementors choose "application-name" and
<link rel=icon>over proprietary stuff, of course.It's personally not what I think is ideal (I preferred no name or icons in the manifest), but it's a fair compromise. And there may be some benefits to having name and icon in the manifest: centralization and manifest-based updates to the metadata, so devs can update their icons and the apps name (though we still need a security model for that, as if it happens automatically an app can change itself to look like another app... Which would be bad).
At least now we can move forward onto more interesting problems.
matthewp commentedon Feb 14, 2014
As long as we continue to have the HTML fallback, realistically few UAs are going to adopt the manifest in the short or mid term.
kornelski commentedon Feb 14, 2014
@matthewp Lack of backwards compatibility doesn't seem like a good motivation to adopt a new technology. Manifest should be adopted because it's a better solution.
marcoscaceres commentedon Feb 14, 2014
what @pornel said. It should be ok, but it might mean that we don't end up with good support for
application-nameandlink rel=iconon the platform. Anyway, let's see how this plays out over the next 2 years. Still a long road ahead before any of this becomes a reality.sicking commentedon Feb 14, 2014
I enumerated a few reasons why having name and icons in the manifest makes more sense than relying on the HTML file here: http://lists.w3.org/Archives/Public/www-tag/2014Feb/0039.html
Once we see the manifest spec being successful, I think we should make the HTML spec specifically mark the application-name as deprecated and encourage authors to use the manifest instead. Not sure if the same makes sense for icons since the icons is also displayed in the URL-bar in most UAs.
Removed name and icon (closes #97)
Removed name and icon (closes #97)
Removed name and icon (closes #97)
Removed name and icon (closes #97)
Removed name and icon (closes #97)
OmidHekayati commentedon Jun 25, 2019
@marcoscaceres I think this issue must open again for these reasons:
main.htmlfile in any URL and browser can cache it once for start app in any URL by that file.manifestormain.htmlfile.And also I think register another app logic process as
service-workeralso is a huge mistake in web standard due to just register onemain.jsto start an app is enough and devs can write the logic in desired order to handle everything.I propose this way to tell the browser that our app can be PWA (or just has CSR ability)
By above CSR standard propsal that indicate a
main.htmlfile to render all URL, we also able to write a compiler to compile web apps to native OS apps easily.(p.s. We consider to continue this approach, not use any manifest file and make a compiler like Flutter but in HTML standards, not complete new languages.)
Last but not least as lots of good face HTML specification never get standard like @apply in CSS, Editors must be brave to abandoned
manifest.webmanifestfile from specification and introducemain.htmlbefore it's too late and uses some meta and link tags.