Contact emails
Explainer
None
Specification
Summary
Chromium now recognizes all valid JSON MIME types as defined by the WHATWG mimesniff specification. This includes any MIME type whose subtype ends with “+json”, in addition to the traditional application/json and text/json. This change ensures that web APIs
and features relying on JSON detection behave consistently with the web platform standard and other browsers. A key motivation for this change is to fix JSON module import behavior, where previously valid JSON MIME types like text/html+json and image/svg+json
would fail to load as modules. Draft CL:
https://chromium-review.googlesource.com/c/chromium/src/+/6525687
Related Issues:
https://github.com/whatwg/mimesniff/issues/112.
The consensus was to retain the broad definition of JSON MIME types—including all */*+json.
Blink component
Search tags
TAG review
None; this is a small change to match an existing spec and behavior of other browsers.
TAG review status
Not applicable
Risks
Interoperability and Compatibility
Interoperability risk is low. This change brings Chromium into alignment with the WHATWG MIME Sniffing Standard §4.6, which defines a JSON MIME type as any MIME type whose subtype ends with +json (e.g., text/html+json, image/svg+json), or is exactly application/json
or text/json. Firefox and Safari already match this behavior, and the change improves interoperability for web developers.
https://wpt.fyi/results/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.html
A specific compatibility consequence is that JSON module imports (both static and dynamic) of files with */*+json MIME types would previously have produced an error but will now succeed. This seems low risk.
Gecko: Shipped/Shipping
WebKit: Shipped/Shipping
Web developers: No signals
Other signals:
Ergonomics
None expected
WebView application risks
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
Debuggability
None
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes
Yes
Flag name on about://flags
None
Finch feature name
SpecCompliantJsonMimeTypes
Rollout plan
Will ship enabled for all users
Requires code in //chrome?
False
Estimated milestones
Shipping on desktop
|
138
|
Shipping on Android
|
138
|
Shipping on WebView
|
138
|
Anticipated spec changes
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g.,
changing to naming or structure of the API in a non-backward-compatible way).
None
Link to entry on the Chrome Platform Status