Copyright © 2024 World Wide Web Consortium. W3C® liability, trademarkand permissive document licenserules apply.
This specification defines a JSON-based file format that provides developers with a centralized place to put metadata associated with a web application. This metadata includes, but is not limited to, the web application's name, links to icons, as well as the preferred URL to open when a user launches the web application. The manifest also allows developers to declare a default screen orientation for their web application, as well as providing the ability to set the display mode for the application (e.g., in fullscreen). Additionally, the manifest allows a developer to "scope" a web application to a URL. This restricts the URLs to which the manifest is applied and provides a means to "deep link" into a web application from other applications.
Using this metadata, user agents can provide developers with means to create user experiences that are more comparable to that of a native application.
This section describes the status of this document at the time of its publication. A list of currentW3C publications and the latest revision of this technical report can be found in theW3Ctechnical reports indexat https://www.w3.org/TR/.
This document was published by theWeb Applications Working Groupas a Working Draft using the Recommendation track.
Publication as a Working Draft does not imply endorsement byW3Cand its Members.
This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the W3CPatent Policy. W3Cmaintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of theW3CPatent Policy.
This document is governed by the 03 November 2023W3CProcess Document.
Anapplication manifestis a [JSON] document that contains startup parameters and application defaults for when a web application is launched.
A manifest has an associatedmanifest URL, which is the [URL] from which themanifestwas fetched.
Amanifestcan have any of the following members at its root, all of which are optional. The members can appear in any order.
background_color
dir
display
icons
lang
name
orientation
prefer_related_applications
related_applications
scope
short_name
shortcuts
start_url
theme_color
This section is non-normative.
This section shows how developers can make use of the various features of this specification.
This section is non-normative.
The following shows a typicalmanifest.
{
"lang":"en",
"dir":"ltr",
"name":"Super Racer 3000",
"short_name":"Racer3K",
"icons":[{
"src":"icon/lowres.webp",
"sizes":"64x64",
"type":"image/webp"
}, {
"src":"icon/lowres.png",
"sizes":"64x64"
}, {
"src":"icon/hd_hi",
"sizes":"128x128"
}],
"scope":"/",
"id":"superracer",
"start_url":"/start.html",
"display":"fullscreen",
"orientation":"landscape",
"theme_color":"aliceblue",
"background_color":"red"
}
This section is non-normative.
The example also shows how to use the link type "manifest" and how
to use othermeta
andlink
elements to give the web
application a fallback name and set of icons.
<!doctype>
<html>
<title>Racer 3K</title>
<!-- Startup configuration -->
<linkrel="manifest"href="manifest.webmanifest">
<!-- Fallback application metadata for legacy browsers -->
<metaname="application-name"content="Racer3K">
<linkrel="icon"sizes="16x16 32x32 48x48"href="lo_def.ico">
<linkrel="icon"sizes="512x512"href="hi_def.png">
This section is non-normative.
In the following example, the developer has made the following choices about the icons associated with the web application:
type
member. If the user agent doesn't support WebP, it falls
back to the second icon of the same size. TheMIME typeof
this icon can then be either determined via a HTTP header, or can
besniffedby the user agent
once the first few bytes of the icon are received.
{
"icons":[
{
"src":"icon/lowres.webp",
"sizes":"48x48",
"type":"image/webp"
},{
"src":"icon/lowres",
"sizes":"48x48"
},{
"src":"icon/hd_hi.ico",
"sizes":"72x72 96x96 128x128 256x256"
},{
"src":"icon/hd_hi.svg",
"sizes":"257x257"
}]
}
This section is non-normative.
In the following example, the developer has included two shortcuts. Assuming the manifest's URL is https://example.com/manifest.webmanifest:
{
"shortcuts":[
{
"name":"Play Later",
"description":"View the list of podcasts you saved for later",
"url":"/play-later",
"icons":[
{
"src":"/icons/play-later.svg",
"type":"image/svg+xml"
}
]
},
{
"name":"Subscriptions",
"description":"View the list of podcasts you listen to",
"url":"/subscriptions?sort=desc"
}
]
}
This section is non-normative.
Thescope
member tells the browser which documents are
part of a web application, and which are not - and hence, to which
set of web pages the manifest is "applied"when the user
navigates around a web site.
For example,{ "scope": "/" }
means that the manifest applies to
every document in an origin. On the other hand,{ "scope":
"/racer/" }
means that only documents within the path "/racer/" are
within scope:so "/racer/race1.html", "/racer/race2.html",
etc. would all bewithin scope,but "/elsewhere/" and
anything at the root "/" would be "out of scope" and the manifest
wouldn't apply to documents in those paths. Only one scope path is
supported. See6.
Navigation scopefor the technical details.
Applyinga manifest means that any members that affect presentation found in the manifest will come into effect, such as display "fullscreen", or applying a particular screen orientation. As long as the application is navigated to URLs that are within scope,the browser will continue to apply the manifest. However, navigating the web applications "out of scope" will cause the manifest to no longer be applied, and the browser will apply its own defaults. This will cause, for example, the application to no longer be displayed in fullscreen, and instead be displayed as a regular web page in a browser tab. It's left up to implementers to decide how to deal with web pages being navigated in and out of scope. See1.17.5 Applying the manifestfor the technical details.
Finally, as it's possible that a user can install a web application
from any document within an origin, it's good practice to always
declare ascope
member in a manifest. If the
scope
member is missing from the manifest, then the
path of thestart_url
member is used as a fallback.
And if thestart_url
member is also missing, then the
document URL from which the web application is installed gets used
as the scope. To be sure you don't get any unexpected navigation
behavior, always include ascope
member preferably set
to"/"
.
Themanifest'sdir
member specifies the default string
direction for thelocalizable membersof themanifest.
Thedir
member's value can be set to a
text-direction.
Thelocalizable membersare:
name
member.
short_name
member.
name
member.
short_name
member.
description
member.
Thetext-directionsare the following, implying that the value of thelocalizable membersis by default:
Thetext-direction listis thelist« "ltr","rtl", "auto"».
Toprocess thedir
member,givenordered map
jsonandordered mapmanifest:
Themanifest'slang
member is astringin the form of a
language tagthat specifies the language for the values of the
manifest'slocalizable members.If thelang
member is not
specified, the language is treated as unknown.
Specifying the language improves the user experience by helping user agents select the most appropriate processing or resources, such as fonts, styling, hyphenation, or text-to-speech voices for accessibility.
Alanguage tagis astringthat matches the production
of a well-formedLanguage-Tag
defined in [BCP47].
Language tags are case-insensitive. Examples of language tags include
'fr
' (French), 'en-AU
' (English as spoken in Australia), or
'zh-Hans-CN
' (Chinese as written in the Simplified Han script as
spoken in China).
Toprocess thelang
member,givenordered map
jsonandordered mapmanifest:
false
,return.
Themanifest'sname
member is astringthat
represents the name of the web application as it is usually displayed
to the user (e.g., amongst a list of other applications, or as a
label for an icon).
Thename
member serves as theaccessible nameof an
installed web application.
Whenprocessing a manifest,theprocess a text member
algorithm is used to process thename
member.
Themanifest'sshort_name
member is astringthat
represents a short version of the name of the web application. It is
intended to be used where there is insufficient space to display the
full name of the web application.
Whenprocessing a manifest,theprocess a text member
algorithm is used to process theshort_name
member.
Themanifest'sscope
member is astringthat
represents thenavigation scopeof this web
application'sapplication context.
Toprocess thescope
member,givenordered map
jsonandordered mapmanifest:
Themanifest'sicons
member are images that serve as iconic
representations of the web application in various contexts. For
example, they can be used to represent the web application amongst a
list of other applications, or to integrate the web application with
anOS's task switcher and/or
system preferences.
Themanifest'sdisplay
member represents the developer's
preferreddisplay modefor the web application. Its value is a
display mode.
Toprocess thedisplay
member,givenordered map
jsonandordered mapmanifest:
Themanifest'sorientation
member is astringthat
serves as thedefault screen orientationfor alltop-level
browsing contextsof the web application. The possible values are
those of theOrientationLockType
enum, which in this
specification are referred to as theorientation values
(i.e., "any", "natural", "landscape", "portrait", "portrait-primary",
"portrait-secondary", "landscape-primary", or "landscape-secondary" ).
If the user agent supports the value of theorientation
member as thedefault screen orientation,then that serves as
thedefault screen orientationfor the life of the web
application (unless overridden by some other means at runtime). This
means that the user agentMUSTreturn the orientation to the
default screen orientationany time the orientation is
unlocked [SCREEN-ORIENTATION] or thetop-level browsing
contextisnavigated.
Although the specification relies on the [SCREEN-ORIENTATION]'s
OrientationLockType
,it isOPTIONALfor a user agent to implement
the [SCREEN-ORIENTATION] API. Supporting the [SCREEN-ORIENTATION]
API is, of course, encouraged.
Certain UI/UX concerns and/or platform conventions will mean that
some screen orientations andcannot be used together.
Which orientations and display modes cannot be used together is left
to the discretion of implementers. For example, for some user agents,
it might not make sense to change thedefault screen
orientationof an application while inbrowser
display
mode.
Once the web application is running, other means can change the orientation of atop-level browsing context(such as via [SCREEN-ORIENTATION] API).
Toprocess theorientation
member,givenordered map
jsonandordered mapmanifest:
Themanifest'sstart_url
member is astringthat
represents thestart URL,which is
URLthat the developer would prefer the user agent load when
the user launches the web application (e.g., when the user clicks on
the icon of the web application from a device's application menu or
homescreen).
Thestart_url
member is purely advisory, and a user
agentMAYignoreit or provide the end-user the choice not to
make use of it. A user agentMAYalso allow the end-user to modify
the URL when, for instance, a bookmark for the web application is
being created or any time thereafter.
Toprocess thestart_url
member,givenordered map
json,ordered mapmanifest,URL
manifest URL,andURLdocument URL:
start_url
tracking
It's conceivable that thestart_url
could be crafted
to indicate that the application was launched from outside the
browser (e.g.,"start_url": "index.html?launcher=homescreen"
).
This can be useful for analytics and possibly other customizations.
However, it is also conceivable that developers could encode
strings into the start_url that uniquely identify the user (e.g., a
server-assigned identifier, such as"?user=123"
,"/user/123/"
,
or"https://user123.foo.bar"
). This is fingerprinting/privacy
sensitive information that the user might not be aware of.
It is bad practice for a developer to use thestart URLto include information that uniquely identifies a user, as it would represent a fingerprint that is not cleared when the user clears site data. However, nothing in this specification can practically prevent developers from doing this.
Given the above, it isRECOMMENDEDthat, upon installation, or any time thereafter, a user agent allows the user to inspect and, if necessary, modify thestart URLof an application.
A user agentMAYoffer other protections against this form of fingerprinting. For example, if a user clears data from an origin, the user agentMAYoffer to uninstall applications that are within scopeof that origin, thus removing the potential fingerprint from the application's start URL.
Themanifest'sid
member is astringthat represents
theidentityfor the application. Theidentitytakes
the form of a URL, which is same origin as thestart URL.
Theidentityis used by user agents to uniquely identify the application universally. When the user agent sees a manifest with an identitythat does not correspond to an already-installed application, itSHOULDtreat that manifest as a description of a distinct application, even if it is served from the same URL as that of another application. When the user agent sees a manifest where manifest[ "id" ] isequal(withexclude fragmentsOPTIONALLY set to true) to theidentityof an already-installed application, itSHOULDbe used as a signal that this manifest is a replacement for the already-installed application's manifest, and not a distinct application, even if it is served from a different URL than the one seen previously.
Theidentitycan be used by a service that collects lists of web applications to uniquely identify applications.
Theidentityis processed like a URL but it doesn't point to a resource that can be navigated to, so it's not required to be within scope.
Toprocess theid
member,givenordered map
json,ordered mapmanifest:
Themanifest'stheme_color
member serves as thedefault
theme colorfor an application context. What constitutes a
theme coloris defined in [HTML].
If the user agent honors the value of thetheme_color
member as thedefault theme color,then that color serves as
thetheme colorfor all browsing contexts to which the
manifest isapplied.However, a document may override the
default theme colorthrough the inclusion of a valid [HTML]
meta
element whosename
attribute value is
"theme-color"
.
The user agentMAYignore thetheme color'salpha componentbased on the context. For example, in most environments, thetheme colorcannot be transparent.
ImplementorsMAYoverride the value defined by the
theme_color
member to supportprefers-color-scheme.
Whenprocessing a manifest,theprocess a color member
algorithm is used to process thetheme_color
member.
Themanifest's
member describes the
expected background color of the web application. It repeats what is
already available in the application stylesheet but can be used by
theuser agentto draw the background color of a web
application for which the manifest is known before the files are
actually available, whether they are fetched from the network or
retrieved from disk.
background_color
Thebackground_color
member is only meant to improve the
user experience while a web application is loading andMUST NOTbe
used by theuser agentas the background color when the web
application's stylesheet is available.
ImplementorsMAYoverride the value defined by the
background_color
member to supportprefers-color-scheme.
Whenprocessing a manifest,theprocess a color member
algorithm is used to processbackground_color
member.
Themanifest'sshortcuts
member is anlistof
shortcut items that provide access to key tasks within a web
application.
How shortcuts are presented, and how many of them are shown to the user, is at the discretion of the user agent and/or operating system.
Toprocess theshortcuts
member,givenordered map
json,ordered mapmanifest,and
URLmanifest URL:
A user agentSHOULDexpose shortcuts via interactions that are consistent with exposure of an application icon's context menu in the host operating system (e.g., right click, long press). A user agent SHOULDrender the shortcuts in the same order as they are provided in the manifest. A user agentSHOULDrepresent the shortcuts in a manner consistent with exposure of an application icon's context menu in the host operating system. A user agentMAYtruncate the list of shortcuts presented in order to remain consistent with the conventions or limitations of the host operating system.
This section defines algorithms forprocessing a manifest,and applyingamanifest.
A user agentMUSTsupport the link type "manifest" and the associated steps for how to fetch and process the linked resource.
When instructed toignore,the user agentMUSTact as if whatever manifest, member, or value caused the condition is absent.
The following algorithm provides anprocessing extension-point:other specifications that add new members to the manifest are encouraged to hook themselves into this specification at this point in the algorithm. TheySHOULD NOT modify the existing values already in themanifest object.
Theprocessing extension-pointis meant to help avoidissues related to monkey patching.
The steps forprocessing a manifestare given by the following algorithm. The algorithm takes aURLdocument URL,a URLmanifest URL,and abyte sequencebodyBytes.
dir
memberpassingjsonandmanifest.
lang
memberpassingjsonandmanifest.
start_url
memberpassingjson,manifest,
manifest URL,anddocument URL.
id
memberpassingjsonandmanifest.
scope
memberpassingjson,manifest,and
manifest URL.
display
memberpassingjsonandmanifest.
orientation
memberpassingjson,
manifest.
related_applications
memberpassingjson
andmanifest.
shortcuts
memberpassingjson,manifest,
andmanifest URL.
OnlysRGBcolors, and colors the user agent can convert to
sRGBwithout any outside knowledge (e.g.,"AliceBlue"
), are
supported. For example,lab(…)
orcolor(display-p3,…)
can be
converted tosRGBwithout outside knowledge, but
color(--custom-profile,…)
would require finding a matching
"@color-profile" rule which cannot be specified in the manifest.
Toprocess a color member,usingordered map json,ordered mapmap,and stringmember:
Toprocess a text member,givenordered map json,ordered mapmap,and stringmember:
Theprocessing a manifeststeps are invoked by [HTML]'s
processing steps for thelink
element, butMAYalso be invoked
by the user agent to process a manifest without an associated
document.
In this case, to match the guarantees made by the corresponding steps in [HTML], the user agentSHOULDensure that at least at some point in the past:
link
element
linkElementwith arel
of
manifest
and ahref
that resolves to
manifest URL,and that
Origin
is
document URL'sorigin,and whosecredentials modeis set to theCORS settings attribute credentials mode
forlinkElement'scrossorigin
attribute.
Aprocessed manifestisappliedto atop-level browsing context,meaning that the members of the processed manifestare affecting the presentation or behavior of a browsing context.
Atop-level browsing contextthat has a manifest applied to it is referred to as anapplication context.
If anapplication contextis created as a result of the user
agent being asked tonavigateto adeep link,the
user agentMUSTimmediatelynavigateto thedeep link
withhistoryHandlingset to "replace
".Otherwise, when
theapplication contextis created, the user agentMUST
immediatelynavigateto thestart URLwith
historyHandlingset to "replace
".
The appropriate time toapplya manifest is when the application contextis created and before navigationto thestart URLbegins.
As specified formanifest
link relation, the manifest
is fetched and processed on every page load. When theprocessing a manifestis successful, user agentsMAYapply updated manifest
to any current and futureapplication contextsassociated
with the application.
For the purpose of updating, the following member are security-sensitive members,as they are presented during installation and on launch surfaces:
User agentsSHOULD NOTautomatically apply changes to security-sensitive memberswithoutexpress permissionfrom the user.
Instead, user agentsSHOULDpresent changes tosecurity-sensitive memberswith appropriate management options, so the user can make an informed decision about updating the web application.
The user agentMAYautomatically apply the changes if the update does not contain changes tosecurity-sensitive members.
Eachmanifest image resourceis animage resourcethat is conceptually part of a web application, suitable to use in various contexts depending on the semantics of the member that is using the object (e.g., an icon that is part of an application menu, etc.).
Amanifest image resourcediffers from aimage resourcein that
it can have an additionalpurpose
member.
User agentsMAYmodify the images associated with anmanifest image resourceto better match the platform’s visual style before displaying it to the user, for example by rounding the corners or painting it in a specific color. It is recommended that developers prepare their image resources for such scenarios to avoid losing important information through, e.g., change of color or clipped corners.
Thepurpose
member is an
unordered set of unique space-separated tokens.The allowed
values are theicon purposes.
When amanifest image resourceis used as anicon,a developer can hint that the image is intended to serve some special purpose in the context of the hostOS(i.e., for better integration). User agentsSHOULD NOTuse an icon other than for its statedicon purpose.
For example, an icon with purpose "monochrome"could
be used as a badge or pinned icon with a solid fill, visually
distinct from an application's full color launch icon. The user agent
uses the value of thepurpose
member as a
hint to determine where and how anpurpose
is displayed. Unless declared otherwise by the
developer, a user agent can use an icon forany purpose.
Theicon purposesare as follows:
purpose
is required. For example, amanifest image resourcewith a "any" purpose wouldn't be used in a context
where "monochrome"is required.
Theicon purposes listis thelist« "monochrome","maskable","any"».
If an icon contains multiple purposes, it could be used for any of
those purposes. If none of the stated purposes are recognized, the
icon is totally ignored. For example, if an icon has purpose
"monochrome fizzbuzz"
,then it could be used as a monochrome icon,
as"monochrome"
is a valid purpose. However, if an icon just has
the purpose"fizzbuzz"
,then it will be ignored.
Todetermine the purpose of an image,givenordered mapjson:
The security policy that governs whether auser agentcan
fetch an icon image is governed by theimg-src
directive [CSP3]
associated with the manifest's ownerDocument
.
Some platforms have their own preferred icon shape, but as web applications should work across multiple platforms, it is possible to indicate that an icon can have a user-agent-specified mask applied by adding themaskablepurpose. This allows the platform to ensure that the icon looks well integrated with the platform, and even apply different masks and background colors in different places throughout the platform.
Thesafe zoneis the area within amaskableicon which is guaranteed to always be visible, regardless of user agent preferences. It is defined as a circle with center point in the center of the icon and with a radius of 2/5 (40%) of the icon size, which means the smaller of the icon width and height, in case the icon is not square.
Designers ofmaskableicons will want to make sure that all important parts are within thesafe zone.
All pixels in this zone are guaranteed to be seen in all masks. Pixels outside the safe zone are not guaranteed to (but can) be visible depending on the applied mask.
The user agentMAYapply a mask of any size, making any pixels that are more than 2/5ths of the image size (minimum of width and height if non-square) away from the center (thesafe zone) transparent.
The user agentMUST NOTmake any pixel within the safe zone transparent.
The user agentMAYenlarge the icon by adding additional padding.
If the icon contains transparent pixels, the user agentMUST composite the icon onto a solid fill (e.g., white) of the user agent's choice.
It is suggested that designers avoid using transparent pixels in maskable icons.
By staying inside thesafe zone,most icons will have around 10% padding on the top, bottom, right and left with no content or non-essential content, such as an icon background. It is suggested that developers check their icon when all but the safe zone is masked out.
Some platforms enforce that icons be displayed with asolid fillsuch as a single color, where only the transparency of the icon can be declared in amanifest.As web applications need to work across multiple platforms, it is possible to indicate that an icon can have an user-agent-specified color applied by adding the monochromepurpose. This allows the platform to ensure that the icon looks well integrated with the platform, and even apply different colors and padding in different places throughout the platform.
When presenting amonochromeicon, the user agent MUST NOTindependently display the red component, green component, or blue component of a pixel. The user agentSHOULDdisplay each pixel with its original alpha value, but with a red, green, and blue value of the user agent's choosing. It isRECOMMENDEDthat the user agent use the same color value for all pixels.
Designers ofmonochromeicons could set all pixels to black and only use transparency to create a silhouette of their icon.
The user agentMAYenlarge the icon by adding additional padding.
The user agentMAYadd a background of any color behind transparent pixels, andSHOULDensure that the background has sufficient contrast with the icon.
Toprocess image resources,givenlistimages, ordered mapmap,manifest URLandstring member:
Eachshortcut itemis an ordered mapthat represents a link to a key task or page within a web app. It has the following members:
A user agent can use these members to assemble a context menu to be displayed by the operating system when a user engages with the web app's icon. When the user invokes a shortcut from the operating system menu, the user agentSHOULDrunlaunching a shortcut.
Theshortcut item'sname
member is astringthat
represents the name of the shortcut as it is usually displayed to the
user in a context menu.
Theshortcut item'sshort_name
member is astring
that represents a short version of the name of the shortcut. It is
intended to be used where there is insufficient space to display the
full name of the shortcut.
Theshortcut item'sdescription
member is astring
that allows the developer to describe the purpose of the shortcut.
User agentsMAYexpose this information to assistive technology.
Theshortcut item'surl
member is a URLwithin scopeof aprocessed manifestthat opens when the
associated shortcut is activated.
Theshortcut item'sicons
member lists images that serve as
iconic representations of the shortcut in various contexts.
Whenshortcut itemshortcuthaving manifestis invoked, run the steps tolaunch a web applicationwithmanifestandshortcut.url.
Toprocess a shortcut,givenordered mapitemandscope,:
Therelated_applications
member of this specification currently only has a single implementation. As such, it has been marked "at risk"as per the W3C Process, meaning that:
[The feature] may be removed before advancement to Proposed Recommendation without a requirement to publish a new Candidate Recommendation.
The Web Apps Working Group is seeking a second implementation in order to keep this feature in the specification.
Eachexternal application resourcerepresents an application related to the web application.
Anexternal application resourcecan have the following members, some of which are required to be avalid external application resource:
fingerprints
member
id
member
min_version
member
platform
member
url
member
Avalid external application resourceMUSThaveplatform
member, and either anurl
or anid
member (or both).
Theplatform
member
represents theplatformthisexternal application resourceis
associated with. Aplatformrepresents a
software distribution ecosystem or possibly an operating system. This
specification does not define the particular values for the
platformmember.
Anexternal application resource'surl
member is the
URLwhere the application can be found.
Toprocess theurl
member of an application:
Anexternal application resource'sid
member represents the
id which is used to represent the application on the platform.
Anexternal application resource'smin_version
member
represents the minimum version of the application that is considered
related to this web app. This version is astringwith
platform-specific syntax and semantics.
Anexternal application resource'sfingerprints
member
represents anlistoffingerprints.
Afingerprintrepresents a set of cryptographic fingerprints used for verifying the application. A fingerprint has the following two members:typeandvalue.Each of these arestrings, but their syntax and semantics are platform-defined.
A common use case of a manifest is for a user agent to installa web application; whereby the user agent provides the end-user with a means of instantiating a newtop-level browsing contextthat has the manifest's membersappliedto it. A web application that is installed is known as ainstalled web application.That is, the manifest's members, or their defaults, are in effect on thetop-level browsing context. This distinguishes an installed web application from a traditional bookmark, as opening a web page from a traditional bookmark will not have the manifest's propertiesappliedto it.
For example, on user agents that support installation, a web application could be presented and launched in a way that, to the end-user, is indistinguishable from native applications: such as appearing as a labeled icon on the home screen, launcher, or start menu. Whenlaunching a web application,the manifest is appliedby the user agent to thetop-level browsing contextprior to thestart URLbeing loaded. This gives the user agent an opportunity to apply the relevant values of the manifest, possibly changing thedisplay modeand screen orientation of the web application. Alternatively, and again as an example, the user agent couldinstallthe web application into a list of bookmarks within the user agent itself.
Theapplication's nameis derived from either the
name
member orshort_name
member.
When either thename
member or the
short_name
member is missing, empty, or the wrong type,
a user agentMAYuse thename
member as a fallback for
theshort_name
member orshort_name
member
as the fallback for thename
member.
If thename
andshort_name
members are
missing, empty, or the wrong type, a user agentMAYfallback to the
Document
to find suitable replacements for missing manifest
members (e.g., usingapplication-name
in place ofname
orshort_name
). Alternatively, the user agentSHOULD
assign a default name (e.g., "Untitled" ) that follows platform
conventions. Alternatively, a user agentMAYallow the end-user to
input some text that can serve as theapplication's name.
When both thename
andshort_name
members
are present, it is left up to implementations to decide which member
is best suited for the space available (e.g., the
short_name
member might be better suited for the space
available underneath an icon).
At the discretion of the operating system or user agent, run the steps tolaunch a web applicationwith aprocessed manifest.
This would typically take place when the user selects an installedweb app from an app launching UI surface e.g., a home screen, launcher or start menu.
The steps tolaunch a web applicationis given by the following algorithm. The algorithm takes aprocessed manifest manifest,an optionalURLtarget URL, an optionalPOST resourcePOST resourceand returns an application context.
target URL,if given,MUSTbewithin scopeof manifest.
Other specificationsMAYreplace this algorithm's steps with their own steps. This replacement will take effect for all invocations of launch a web application.
This algorithm is replaceable to allow an experimentallaunch_handlermanifest field to configure the behavior of all web application launches. The replacement algorithm invokescreate a new application contextby default but under certain conditions behaves differently.
The steps tocreate a new application contextis given by the following algorithm. The algorithm takes aprocessed manifestmanifest,an optionalURLtarget URL,an optionalPOST resourcePOST resourceand returns anapplication context.
It isRECOMMENDEDthat UI that affords the end user the ability to installa web application also allows inspecting the icon, name,start URL,origin, etc. pertaining to a web application. This is to give an end-user an opportunity to make a conscious decision to approve, and possibly modify, the information pertaining to the web application before installing it. This also gives the end-user an opportunity to discern if the web application is spoofing another web application, by, for example, using an unexpected icon or name.
It isRECOMMENDEDthat user agents prevent other applications from determining which applications are installed on the system (e.g., via a timing attack on the user agent's cache). This could be done by, for example, invalidating from the user agent's cache the resources linked to from the manifest (for example, icons) after a web application isinstalled- or by using an entirely different cache from that used for regular web browsing.
User agentsSHOULDprovide a mechanism for the user to remove an installed web applicationapplication.
It isRECOMMENDEDthat at the time of removal, the user agent also present the user with an opportunity to revoke other persistent data and settings associated with the application, such as permissions and persistent storage.
Adisplay moderepresents how the web application is being presented within the context of anOS(e.g., in fullscreen, etc.). Display modes correspond to user interface (UI) metaphors and functionality in use on a given platform. The UI conventions of the display modes are purely advisory and implementers are free to interpret them how they best see fit.
This specification defines the followingdisplay modes:
Thefullscreendisplay modeis orthogonal to,
and works independently of, theFullscreen API Standard.Thefullscreendisplay modeaffects the fullscreen state of
the browser window, while the [FULLSCREEN] API operates on an element
contained within the viewport. As such, a web application can have its
display modeset tofullscreen,while
document.fullScreenElement
returnsnull
,andfullscreenEnabled
returnsfalse
.
Once a user agentappliesa particulardisplay modeto an application context,it becomes thedefault display modefor thetop-level browsing context(i.e., it is used as the display mode when the window isnavigated). The user agentMAYoverride thedefault display modefor security reasons (e.g., thetop-level browsing contextisnavigatedto another origin) and/or the user agentMAYprovide the user with a means of switching to anotherdisplay mode.
When thedisplay
member is missing, or if there is no
validdisplay
member, the user agent uses thebrowserdisplay modeas thedefault display mode.
As such, the user agentMUSTsupport thebrowser
display mode.
Everydisplay modehas afallback chain,which is a list ofdisplay modes.Thefallback chainfor:
Thesteps for determining the web app's chosen display mode is given by the following algorithm. The algorithm takes a processed manifestmanifestand returns adisplay mode.
The above loop is guaranteed to return a value before the assertion, due to the fact thatbrowseris in every mode's fallback chain,and the requirement that all user agents support thebrowserdisplay mode.
Thedisplay modes listis thelist« "fullscreen","standalone","minimal-ui","browser"».
A user agentMUSTreflect the applieddisplay modeof the web
application in thedisplay-mode
media feature [MEDIAQUERIES-5].
A user agent will expose the actual display mode being applied — not
necessarily the one declared in the manifest — via the
display-mode
media feature, accessible through CSS or
JavaScript. Note that this media feature will also reflect other
display modes for a web page when a manifest is not being applied. For
example, if the end-user puts the page into fullscreen, then the user
agent would reflect this change to CSS and scripts via the
display-mode
media feature.
This specification does not directly deal with high-value data. However,installed web applicationsand their data could be seen as "high value" (particularly from a privacy perspective).
As the manifest format is JSON and will be encoded using [UNICODE], the security considerations described in [JSON] and [UNICODE-SECURITY] apply. In addition, because there is no way to prevent developers from including custom/unrestrained data in a manifest,implementors need to impose their own implementation-specific limits on the values of otherwise unconstrained member types, e.g. to prevent denial of service attacks, to guard against running out of memory, or to work around platform-specific limitations.
Web applications will generally contain ECMAScript, HTML, CSS files, and other media, which are executed in a sand-boxed environment. As such, implementors need to be aware of the security implications for the types they support. Specifically, implementors need to consider the security implications outlined in at least the following specifications: [CSS-MIME], [ECMAScript-MIME], [HTML].
As web applications can contain content that is able to simultaneously interact with the local device and a remote host, implementors need to consider the privacy implications resulting from exposing private information to a remote host. Mitigation and in-depth defensive measures are an implementation responsibility and not prescribed by this specification. However, in designing these measures, implementors are advised to enable user awareness of information sharing, and to provide easy access to interfaces that enable revocation of permissions.
As this specification allows for the declaration of URLs within certain members of a manifest, implementors need to consider the security considerations discussed in the [URL] specification. Implementations intending to displayIRIsandIDNAaddresses found in the manifest are strongly encouraged to follow the security advice given in [UNICODE-SECURITY].
Developers need to be aware of the security considerations discussed
throughout the [CSP3] specification, particularly in relation to
makingdata:
a valid source for the purpose ofinlining
a
manifest. Doing so can enable XSS attacks by allowing a manifest to be
included directly in the document itself; this is best avoided
completely.
It isRECOMMENDEDthat UI that affords the end user the ability to installa web application also allows inspecting the icon, name, start URL,origin, etc. pertaining to a web application. This is to give an end-user an opportunity to make a conscious decision to approve, and possibly modify, the information pertaining to the web application before installing it. This also gives the end-user an opportunity to discern if the web application is spoofing another web application, by, for example, using an unexpected icon or name.
It isRECOMMENDEDthat user agents prevent other applications from determining which applications are installed on the system (e.g., via a timing attack on the user agent's cache). This could be done by, for example, invalidating from the user agent's cache the resources linked to from the manifest (for example, icons) after a web application is installed- or by using an entirely different cache from that used for regular web browsing.
It's conceivable that a shortcuturl
could be crafted
to indicate that the application was launched from outside the browser
(e.g.,"url": "/task/?from=homescreen"
). It is also conceivable that
developers could encode strings into theurl
that
uniquely identify the user (e.g., a server assignedUUID).
This is fingerprinting/privacy sensitive information that the user
might not be aware of.
When the web application is running, it isRECOMMENDEDthat the user agent provides the end-user a means to access common information about the web application, such as the origin, start and/or current URL, granted permissions, and associated icon. How such information is exposed to end-users is left up to implementers.
Additionally, when applying a manifest that sets thedisplay modeto anything except "browser",it is RECOMMENDEDthat the user agent clearly indicate to the end-user that their are leaving the normal browsing context of a web browser. Ideally, launching or switching to a web application is performed in a manner that is consistent with launching or switching to other applications in the host platform. For example, a long and obvious animated transition, or speaking the text "Launching application X".
Thedisplay
member allows an origin some measure of control over a
user agent’s native UI. After taking over the full screen, it could
attempt to mimic the user interface of another application. This is
also facilitated by the'display-mode'
media feature
[MEDIAQUERIES-5], through which a script can know the display mode of
a web application.
The mime typeapplication/manifest+json
is theapplication manifest media type.Both the mime type and the
.webmanifest
file extension are
registeredwith the Internet Assigned Numbers Authority
(IANA).
If the protocol over which the manifest is transferred supports the [MIME-TYPES] specification (e.g. HTTP), it isRECOMMENDEDthat the manifest be labeled with theapplication manifest media type.
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key wordsMAY,MUST,MUST NOT,OPTIONAL,RECOMMENDED,SHOULD,andSHOULD NOTin this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
There is only one class of product that can claim conformance to this specification: auser agent.
Although this specification is primarily targeted at web browsers, it is feasible that other software could also implement this specification in a conforming manner. For instance, search engines, or crawlers, could find and process manifests to build up catalogs of sites that potentially work as installable web applications.
This section is non-normative.
This specification is designed to be extensible. Other specifications are encouraged to define new members for the manifest. However, in doing so, please follow the conventions used in this specification. In particular, use theprocessing extension-pointto hook into the steps forprocessing a manifest.Also, be sure to specify the steps for processing your particular member in the manner set forth in this specification. This will help keep this part of the platform consistent.
To allow the community to easily find extensions, please add your extensions to theExtensions Registry.
When specifying a new member, don't override ormonkey patch anything defined in this specification. Also, don't assume your member will be processed before or after any other member. Keep your new member, and its processing, atomic and self contained. Note also that implementations are free to ignore any member they do not recognize or support.
If you are writing a specification and temporarily want to patch this specification to help implementations along,file a bugso the community is informed of what you are trying to do.
This section is non-normative.
Although proprietary extensions are undesirable, they can't realistically be avoided. If a user agent chooses to interpret a member in the manifest JSON that is not specified in this document, it can do so, but with care.
We encourage implementors adding proprietary extensions to consider whether they could become a standard (i.e. if it would make sense for a second user agent on a different platform to make use of that member, even if no other user agent has expressed interest right now). If so, we ask authors to design the API in a vendor-neutral way, and propose it as a standard (seeC. Incubations). If the new member is truly proprietary (i.e. will only ever make sense in the context of a proprietary ecosystem), use this process, and prefix it with the short name of that proprietary ecosystem to avoid name collisions.
Do not use vendor prefixes that you intend to later remove once it becomes a standard (those tend to stick around forever). Only use prefixes that will make sense now and into the future.
We encourage implementors to add proprietary extensions to our Extensions Registry.This allows the community to track what extensions vendors and/or the web community have defined and documented. Periodically, we will consider those extensions for standardization.
The following is an example of three hypothetical proprietary extensions.
{
...
"kpl_fancy_feature": "some/url/img",
"gmpc_awesome_thing": {... },
"blitzly_site_verification": "KEY_9864D0966935"
...
}
In this example, we have deliberately chosen (made-up) names of things that could be external sites or services,notnames of browsers or browser vendors. These are not vendor prefixes belonging to the browser that invented them; they are prefixes of proprietary services.
This section is non-normative.
Extensions to this specification are being incubated in parallel by the Web Community, some of which are shipping in multiple browsers. If two or more browser engines end up supporting an incubated feature, then those features will become part of this specification in the future - allowing them to become a standard the Web Platform:
BeforeInstallPrompt
andwindow.onappinstalled
event
BeforeInstallPrompt
event andwindow.onappinstalled
event
were originally part of this specification. However, they were
removed from the
specificationbecause they did not have support from two or more
implementers. You can now find them in theBeforeInstallPrompt
event andwindow.onappinstalled
repositoryat theWICG.
share_target
member
share_target
member registers a web application as "target" for
share actions (e.g., for sharing a text, a URL, or a file). The
share_target
member is part of theWeb Share Target
specification, being incubated at theWICG.
This section is non-normative.
Several members of the Web Application Manifest provide additional metadata related to how the web application may be presented in the context of a digital storefront, installation dialog, or other surfaces where the web application may be marketed or distributed. In an effort to support these use cases better, the following members have been moved intoWeb App Manifest - Application Information:
categories
description
iarc_rating_id
screenshots
This section is non-normative.
An extensive discussion of why we chose to use JSON instead of HTML
meta
/link
tags for this specification is available onGitHuband on the
www-tag
list. Below is a short summary of the key points raised in those
discussions.
The document format defined in this specification provides a unified
means of encapsulating metadata about a Web application in a way that
we hope will avoid existing pitfalls with both proprietary and
[HTML]'smeta
/link
tags. Those pitfalls include:
Although it would be unrealistic to think that this specification won't bring its own set of problems, externalizing this data in the form of a manifest solves the problems described above. These problems are solved by:
meta
tags are currently using, especially when a tag's value contains
several sub-values.
In addition, standardizing the functionality currently provided by the
variousmeta
tag-based solutions within the manifest solves the
problem of having tproprietary and standard [HTML] tags that all
achieve the same thing. Of course, this hinges on the standard actually
getting implemented by browsers and those browsers getting widely
deployed to users: if this happens, the Web community might be able to
retire many of the proprietarymeta
tags plaguing the Web at the time
of writing. More information about the proprietary tags can be found in
theUse Cases and
Requirements for Installable Web Apps.
Lastly, this specification does not make the standardized solutions
found in [HTML] redundant. When members like thename
oricons
is
missing from the manifest, user agents can search in a manifest's owner
[HTML] document for things like icons and the application name (or a
user agent might even fallback to proprietary tags/metadata, if they
are present in a document).
This section is non-normative.
Developers interested in validatingmanifestdocuments can find an unofficialJSON schema for the manifest formatatschemastore.org.It is licensed underApache 2.0.It is kindly maintained byMads Kristensen.If you find any issues with the JSON schema, pleasefile a bugat theSchemaStore repositoryon GitHub.
This section is non-normative.
It is expected that authors will localize the content of a manifest by using one of the following options:
Accept-Language
"
header [RFC9110], or even a custom HTTP header).
Given the options above, developers need to be mindful of the end-user's privacy with respect to their preferred language: When the end-user has explicitly indicated their language preference to a web application (i.e., when not just using the user-agent default language settings), sending the end-user's preferred language in the clear over the wire is generally not OK. Doing so would reveal personal information about an end-user. As such, developers are encouraged to use [TLS] to reduce the chances of pervasive monitoring of their Web applications [RFC7258].
This document attempts to address theUse Cases and Requirements for Installable Web Apps.
This section is non-normative.
The following are some significant changes that were made since First Public Working Draft:
This section is non-normative.
This document reuses text from the [HTML] specification, as permitted by the license of that specification.
Dave Raggett and Dominique Hazael-Massieux contributed to this specification via the HTML5Apps project.
Claudio Gomboli for icon example images.
Indiana University Bloomington security researchers have contributed to this specification by reporting potential risks related to out-of-scope navigation.
application/manifest+json
§A.background_color
§1.15description
§3.3dir
§1.2display
§1.8fingerprints
§4.5lang
§1.3min_version
§4.4orientation
§1.9prefer_related_applications
§1.14purpose
§2.1related_applications
§1.13scope
§1.6shortcuts
§1.16start_url
§1.10theme_color
§1.12CSS
)
Document
interface
Document
)
request
)
crossorigin
attribute (forlink
element)
href
attribute (forlink
element)
link
element
meta
element
name
attribute (formeta
element)
rel
attribute (forlink
element)
list
)
set
)
string
)
list
)
iteration
)
map
)
list
)
list
)
@media
)
@media
)
OrientationLockType
enum
url
)
url/equals
)
url
)
url
)
url
)
url
)
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in: