Manifest member in Manifest
categories manifest member
Published Updated
The categories manifest member is an array of strings naming the store sections a web app belongs in, such as
"productivity" or "games". The W3C Application Information registry defines it as a hint to
catalogs and stores; a browser engine changes nothing about how the app
installs, launches, or renders.
MDN marks browser compatibility as not applicable because stores, not browsers, use the member, and
the browser-compat-data manifests/webapp directory (github.com) has no categories.json file.
Chromium’s manifest parser (manifest_parser.cc) has no handling for the member, and MDN notes that
other browsers may parse it without effect.
Store packagers such as PWABuilder read the array
when they generate listing metadata for the Microsoft Store or a Play Store wrapper.
Member
Section titled “Member”| Property | Value |
|---|---|
| Type | array of strings. The registry publishes a list of known values, including business, education, entertainment, finance, food, games, health, kids, lifestyle, music, news, productivity, shopping, social, sports, travel, utilities, and weather. Other strings are legal; stores map them to their own taxonomy or ignore them. |
| Default | an empty array. A store that finds no usable category classifies the app itself. |
| Example value | ["food", "health", "lifestyle"]. |
The registry encourages authors to write lowercase values. It defines no comparison rule. Chromium does not read the member, so a value that is not an array does not affect the rest of the manifest.
A store is free to list the app under a section the manifest did not name, and a category the manifest names is not shown anywhere in the installed app or in the browser’s install dialog.
Examples
Section titled “Examples”The member has no runtime API. Validate its value in the deployed manifest.
Declaring several store sections for one app
Section titled “Declaring several store sections for one app”A meal-planning app fits more than one section. Listing three categories lets a store that supports multi-category listings surface it in each; a store that supports one category takes the first it recognizes.
{ "name": "Meal Planner", "short_name": "Meals", "start_url": "/", "display": "standalone", "categories": ["food", "health", "lifestyle"]}Keep the first entry the one the app most belongs to: a packager that has to pick a single primary category has nothing else to go on.
Validating the shipped value in a build step
Section titled “Validating the shipped value in a build step”There is no API that reports whether a browser or a store acted on the member, so the useful check is a build-time or test-time assertion against the manifest you deploy. The function lowercases each entry, following the registry’s lowercase recommendation, and flags values outside the registry’s known list.
const KNOWN = new Set([ 'beauty', 'books', 'books & reference', 'business', 'cars', 'dating', 'design', 'developer', 'developer tools', 'development', 'education', 'entertainment', 'events', 'fashion', 'finance', 'fitness', 'food', 'fundraising', 'games', 'government', 'graphics', 'graphics & design', 'health', 'health & fitness', 'kids', 'lifestyle', 'magazines', 'medical', 'multimedia', 'multimedia design', 'music', 'navigation', 'network', 'networking', 'news', 'personalization', 'parenting', 'pets', 'photo', 'photo & video', 'politics', 'productivity', 'reference', 'security', 'shopping', 'social', 'social networking', 'sports', 'transportation', 'travel', 'utilities', 'video', 'weather',]);
export function checkCategories(manifest) { const raw = manifest.categories; if (raw === undefined) return { declared: [], unknown: [] }; // optional member if (!Array.isArray(raw)) throw new Error("categories must be an array of strings"); const declared = raw.map((c) => String(c).toLowerCase()); const unknown = declared.filter((c) => !KNOWN.has(c)); return { declared, unknown };}An absent member is a valid manifest, so the function succeeds with an empty list; an unknown value is reported, not rejected, because stores accept free-form strings.
Reading the value from the page’s own manifest
Section titled “Reading the value from the page’s own manifest”For a settings or “about” page that mirrors store metadata, fetch the manifest the document links to and read the array. The fallback branch handles pages that ship no manifest link.
async function declaredCategories() { const link = document.querySelector('link[rel="manifest"]'); if (!link) return []; // no manifest linked from this document const manifest = await fetch(link.href).then((r) => r.json()); return Array.isArray(manifest.categories) ? manifest.categories : [];}Reading the manifest confirms the declared categories. It cannot tell whether a store listed the app under those sections.
See also
Section titled “See also”- description manifest member
- screenshots manifest member
- Distribute a PWA via app stores
- Web App Manifest - Application Information: categories member (w3c.github.io)
- categories (developer.mozilla.org)
Specifications
| Specification | Status |
|---|---|
| Web App Manifest: categories | W3C draft |
- Legend
- Yes
- Partial
- Flag
- No
- Unknown
| Browser / Platform | Support | Versions | Confidence | Source | Notes |
|---|---|---|---|---|---|
| Chrome (Desktop)# | — Not applicable | — | medium | source | 1 |
| Chrome (Android)# | — Not applicable | — | medium | source | 2 |
| Edge (Desktop)# | — Not applicable | — | medium | source | 3 |
| Samsung Internet# | — Not applicable | — | medium | source | 4 |
| Firefox (Desktop)# | — Not applicable | — | medium | source | 5 |
| Safari (iOS)# | — Not applicable | — | medium | source | 6 |
- Not applicable: categories is app-store metadata read by install/distribution surfaces, never rendered or acted on by the browser engine itself.
- Not applicable: categories is app-store metadata read by install/distribution surfaces, never rendered or acted on by the browser engine itself.
- Not applicable: categories is app-store metadata read by install/distribution surfaces, never rendered or acted on by the browser engine itself.
- Not applicable: categories is app-store metadata read by install/distribution surfaces, never rendered or acted on by the browser engine itself.
- Not applicable: categories is app-store metadata read by install/distribution surfaces, never rendered or acted on by the browser engine itself.
- Not applicable: categories is app-store metadata read by install/distribution surfaces, never rendered or acted on by the browser engine itself.