← Back to release summary

Stricter *+json MIME token validation for JSON modules

Category
Miscellaneous
Type
Chromium catches up
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Reject JSON module script responses whose MIME type’s type or subtype contains non‑HTTP token code points (e.g. spaces) when matched via *+json; aligns with MIME Sniffing spec and other engines. This change is part of the Interop2025 modules focus area. Related Issues: https://bugs.webkit.org/show_bug.cgi?id=297161 Related PR: https://github.com/web-platform-tests/wpt/pull/54219 Draft CL: https://chromium-review.googlesource.com/c/chromium/src/+/6931461

Motivation

Without this change, developers must rely on inconsistent MIME sniffing behavior across browsers, which can lead to incorrect content handling. Aligning with the spec ensures predictable behavior and improves interoperability. Recent WPT additions (PR 54219) https://github.com/web-platform-tests/wpt/pull/54219

Standards & signals

View on chromestatus.com