Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Intent to Ship: Spec-compliant JSON MIME type detection

215 views
Skip to first unread message

Issack John

unread,
May 19, 2025, 4:25:59 PMMay 19
to blink-dev
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

Is this feature fully tested by web-platform-tests?
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
This intent message was generated by Chrome Platform Status.

Issack John

unread,
May 19, 2025, 4:31:57 PMMay 19
to blink-dev, Issack John
We plan to deploy the feature as an enabled-by-default base::Feature, primarily to act as an emergency shutoff valve rather than going through a formal feature rollout. This approach aligns with the consensus-based standards section, which doesn’t call for a gradual rollout, and given the low risk, we believe a full rollout process isn’t necessary.

That said, we’re calling this out here to give an opportunity to raise any concerns about deploying it in this way.

Domenic Denicola

unread,
May 19, 2025, 9:20:57 PMMay 19
to Issack John, blink-dev
LGTM1. This is a nice focused interop and spec-compliance change that should have approximately zero compat impact. I agree with the plan of shipping enabled-by-default and using Finch as an emergency kill switch if something (very) unexpected happens.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/52cec510-3355-4452-b961-b9f5fe1cb323n%40chromium.org.

Yoav Weiss (@Shopify)

unread,
May 20, 2025, 4:55:05 AMMay 20
to Domenic Denicola, Issack John, blink-dev

Yoav Weiss (@Shopify)

unread,
May 20, 2025, 4:56:01 AMMay 20
to Domenic Denicola, Issack John, blink-dev
Can you flip the testing review bit in chromestatus.com? That would ensure the testing folks take a look at this.

Daniel Bratell

unread,
May 20, 2025, 6:15:31 AMMay 20
to Yoav Weiss (@Shopify), Domenic Denicola, Issack John, blink-dev

Issack John

unread,
May 20, 2025, 12:45:42 PMMay 20
to blink-dev, yoav...@chromium.org, Issack John, blink-dev, dom...@chromium.org
Thanks for the reviews! I’ve just requested the testing review on chromestatus.com so it’s on their radar now.
Reply all
Reply to author
Forward
0 new messages