Starting in early May, Rob Dolin began advocating for adding a
categories member to the Web App Manifest spec. It was something we’d been discussing for a while now. It’s a feature that will be incredibly useful to users, especially as it relates to PWAs in the Windows Store, other app stores, and in catalogs. This weekend, our hard work paid off and it was added to the spec!
So what does it do and how do I use it?
First off, the new
categories member is totally optional. It’s there if you think it offers a benefit for your users, but is by no means necessary.
According to the spec:
The categories member is only meant as a hint to catalogs or stores listing web applications and it is expected that these will make a best effort to find appropriate categories (or category) under which to list the web application. Like search engines and meta keywords, catalogs and stores are not required to honor this hint.
categories member is a list of categorizations you want to apply to your site. There are no pre-defined categories, but the W3C is maintaining a list of common categories shared by most app stores and catalogs. You will probably want to use at least one of those to ensure your site gets filed properly.
Here’s quick example of a hypothetical manifest for a web version of the book Gojiro by Mark Jacobson:
"description": "Gojiro, a freak mutation with a cynical worldview, suffers the pain of solitude as well as several maladies experienced by entertainers, including drug abuse and suicidal tendencies.",
"categories": ["books", "fiction", "science fiction & fantasy", "kaiju", "怪獣"]
Here you can see 5 categories being assigned to the book. I chose to start with one of the top-level categories from the list and then get more specific, kinda like how
class names were originally conceived. The genre “Kaiju” is a sub-classification of “science fiction & fantasy” novels, which are a sub-classification of “fiction”, which is a sub-classification of “books”.
Though the W3C list is in English (as with most web specs), there is no requirement to have all of your categories in English. The final entry, “怪獣”, is “Kaiju” in Japanese.
This addition to the Web App Manifest was much-needed and, along with IARC rating (which we also landed recently) will help our users more easily find the resources they’re looking for. Many hearty congrats to Rob for landing this update and for being added as an editor of the spec!
- Categories land in the Web App Manifest | Aaron Gustafson aaron-gustafson.com/notebook/categ…