Although web app manifest files (manifest.webmanifest
) are written in JSON format, they should not be served with the standard Content-Type
application/json
.
Indeed, the W3C standards specify that the content type used to serve Web App Manifest files must be application/manifest+json
. Using the correct header ensures that browsers interpret your manifest correctly, which avoids errors and ensures better compatibility.
This recipe configures your site to systematically use the correct Content-Type
, thereby bringing your site into full compliance with web standards.
If you don't know what a Web App Manifest file is, you can consult our "Web App Manifest" recipe to design and expose a manifest for your website.
How to install this recipe on my website with redirection.io?
Installing this recipe on your website requires the following steps:
- Locate the Web App Manifest file: You can use our free Web App Manifest validator to find the Web App Manifest file on your website. This file is usually named
manifest.webmanifest
,manifest.json
, orsite.webmanifest
, and it is most often located at the root of your website. - Configure the Web App Manifest file path: Paste the path of the Web App Manifest file into the "Path of the manifest file" field.
- Click the install button: This will create a rule in "draft" mode, so you can modify it if necessary.
- Publish the rules: the manifest file will be served with the correct content-type a few seconds after publication.