Contact emails issackj...@microsoft.com<mailto:issackj...@microsoft.com>, dan...@microsoft.com<mailto:dan...@microsoft.com>
Explainer None Specification https://mimesniff.spec.whatwg.org/#json-mime-type 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 Blink>Network<https://issues.chromium.org/issues?q=customfield1222907:%22Blink%3ENetwork%22> Search tags json<https://chromestatus.com/features#tags:json>, mime<https://chromestatus.com/features#tags:mime>, sniffing<https://chromestatus.com/features#tags:sniffing>, spec-compliance<https://chromestatus.com/features#tags:spec-compliance>, interoperability<https://chromestatus.com/features#tags:interoperability> 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<https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>? Yes Test: https://wpt.fyi/results/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.html 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 https://chromestatus.com/feature/5470594816278528?gate=6275763980206080 This intent message was generated by Chrome Platform Status<https://chromestatus.com/>. -- 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+unsubscr...@chromium.org. To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CH2PR00MB074773FD1FC67AFF831D328AC29CA%40CH2PR00MB0747.namprd00.prod.outlook.com.