meta name="mobile-web-app-capable"
Chrome's pre-manifest switch for launching a home screen shortcut as an app; the manifest's display member replaced it.
- Avoid
- Unnecessary
- Severity
- UnnecessaryWorks, but is dead weight.
- Basis
- Vendor documentationOne vendor's documentation is the source.
- Detectable
- YesMatched exactly. Autofixable when the rule carries a fix.
- Matches
meta[name="mobile-web-app-capable" i]Element rule, inside <head>.- Fix
- Removes the element
- Impacts
- Maintainability
- Related
meta/apple-mobile-web-app-capable,meta/application-name
<meta name="mobile-web-app-capable" content="yes"> is Chrome for Android’s answer to
Apple’s apple-mobile-web-app-capable: the same switch without the vendor prefix. Chrome 31
introduced it in 2013 so that “Add to Home screen” could make a shortcut that launches like
an app. It has had a second life lately, because Chrome’s console suggests it as the
replacement for the Apple tag, and frameworks took the hint.
Why avoid
It is the mechanism the manifest replaced. From Chrome 39, Chrome’s own documentation
recommended the W3C web app manifest and described this tag as only for Chrome before M39.
Mozilla quoted exactly that when it declined to implement the tag in Firefox for Android.
The WHATWG registry of meta names never got further than listing it as a “Proposal”,
specified by a Google help page, “though a WHATWG or W3C spec would be preferred”. The
standard that did arrive is the manifest’s display member.
Chrome still reads it, so this isn’t a dead tag, and the rule doesn’t pretend otherwise. Chromium extracts it into page metadata. When someone adds a page to the home screen, Chrome for Android checks for a manifest first. Only when there isn’t one does the meta flag decide whether the shortcut is treated as an app (this tag, or the Apple spelling) or a plain bookmark. On a page with a manifest, the tag changes nothing.
So the console advice solves the wrong problem. Swapping apple-mobile-web-app-capable
for mobile-web-app-capable trades one vendor switch for another. A page with both tags
and a manifest declares its launch mode three times, and the manifest is the one that
counts.
Use instead
<link rel="manifest" href="/app.webmanifest">
{
"name": "Example",
"start_url": "/",
"scope": "/",
"display": "standalone"
}
Detectability
Fully detectable. <meta name> holds a single value, so the selector uses = with the
i flag.
The fix removes the element unconditionally. With a manifest in place that is inert,
because Chrome consults the manifest first. Without one, Chrome for Android may save the
page as a plain bookmark shortcut rather than an app shortcut. Add the manifest and its
display member before applying the fix.
Resources
- Mozilla Bugzilla 1114631 — Detect “web app capable” sites using meta mobile-web-app-capable — Firefox declined, quoting Chrome’s docs: “only recommended for Chrome prior to version M39, from M39 the new W3C web app manifest is the recommended way”.
- WHATWG wiki — MetaExtensions —
mobile-web-app-capableregistered as a “Proposal”, withapple-mobile-web-app-capableas its vendor synonym. - Chromium —
components/webapps/browser/android/add_to_homescreen_data_fetcher.cc— a manifest short-circuits; without one, the meta flag separates app shortcuts from bookmarks. - Chromium —
components/webapps/renderer/web_page_metadata_extraction.cc— the renderer still extractsmobile-web-app-capable. - W3C — Web Application Manifest: display member — the standard replacement.
This page is generated from content/rules/meta/mobile-web-app-capable.md, the same file the linter is built from. Think the rule is wrong, or that browsers moved on? Say so — that is the most useful issue you can file.