← Chrome 160 reference · All APIs
v160 · network · enabled by default
Spec-compliant XML MIME type detection
Chrome 160 updates Blink’s blink::IsXMLMimeType helper to recognize any valid MIME type whose subtype ends in +xml — including non-application types such as text/example+xml, image/example+xml, and font/example+xml — per the WHATWG MIME Sniffing Standard. As a result, PerformanceResourceTiming.contentType minimizes those non-SVG XML types to "application/xml", while "image/svg+xml" remains unchanged.
at a glance
| Shipped in | Chrome 160 (desktop, Android, Android WebView; iOS null) — filed under “Enabled by default” in the milestone=160 listing |
|---|---|
| Runtime flag | SpecCompliantXmlMimeTypes, status stable in Blink’s runtime_enabled_features.json5 (previously behind --enable-features=SpecCompliantXmlMimeTypes / chrome://flags/#enable-experimental-web-platform-features) |
| Specification | WHATWG MIME Sniffing — XML MIME type · Minimize a supported MIME type · Fetch response handover · Resource Timing contentType · RFC 7303 |
| Implementation CL | CL 8301932 · blink::IsXMLMimeType in mime_util.cc |
| Blink-dev intents | Intent to Prototype · Intent to Ship |
| Tracking bug | issues.chromium.org/362282752 |
| Web platform tests | WPT PR #62420 adding cases to mimesniff/mime-types/resources/mime-types-minimized.json, exercised by resource-timing/content-type-minimization.html (wpt.fyi results) |
| ChromeStatus | 5092584283308032 — Spec-compliant XML MIME type detection (component Blink>Network) |
why it exists
Chromium’s blink::IsXMLMimeType helper previously matched only text/xml, application/xml, and application/*+xml (ignoring non-application structured XML suffixes such as text/example+xml, image/example+xml, and font/example+xml). The WHATWG MIME Sniffing Standard defines an XML MIME type independently of its top-level type, and Fetch’s minimize a supported MIME type algorithm relies on that predicate to populate PerformanceResourceTiming.contentType. Updating blink::IsXMLMimeType brings Chromium’s Resource Timing minimization into alignment with the standard.
mime_util.cc.
Syntax
No new JavaScript API surface or HTTP header syntax is introduced. The change updates the WHATWG XML MIME type predicate (+xml matching in blink::IsXMLMimeType, guarded by SpecCompliantXmlMimeTypes) and the resulting minimized string exposed by PerformanceResourceTiming.contentType ("application/xml" vs "image/svg+xml"):
// Resource Timing 2 — existing read-only attribute exposed in Window and Worker
partial interface PerformanceResourceTiming {
readonly attribute DOMString contentType;
};
// WHATWG MIME Sniffing — XML MIME type & minimization rules
// 1. XML MIME type: essence is "text/xml" or "application/xml", OR subtype ends with "+xml"
// 2. Minimize a supported MIME type:
// - JavaScript MIME type -> "text/javascript"
// - JSON MIME type -> "application/json"
// - essence == "image/svg+xml" -> "image/svg+xml"
// - XML MIME type -> "application/xml"
// - other supported MIME -> mimeType's essence
// - unsupported / CORS-fail -> ""
“An XML MIME type is any MIME type whose subtype ends in ‘
+xml’ or whose essence is ‘text/xml’ or ‘application/xml’.”
This reference documents three aspects of the Chrome 160 behavior: blink::IsXMLMimeType classification rules, PerformanceResourceTiming.contentType minimization outputs, and unchanged XHR/document paths, Chrome Actor checks, and migration.
performance_resource_timing.idl.
XML MIME type matching (blink::IsXMLMimeType) — inputs and outputs
Inputs. A parsed HTTP Content-Type MIME type essence (ASCII case-insensitive type/subtype, after parameters such as ; charset=utf-8 are parsed out). In third_party/blink/common/mime_util/mime_util.cc, when SpecCompliantXmlMimeTypes is enabled, blink::IsXMLMimeType checks text/xml, application/xml, and then net::MatchesMimeType("*+xml", mime_type, net::MimeTypeValidationLevel::kWildcardSlashAndTokens).
Outputs. Returns true for any syntactically valid HTTP MIME type whose subtype ends in +xml (ASCII case-insensitively), regardless of whether the top-level type is application, text, image, font, model, or another valid token. Malformed MIME strings (missing slash, invalid HTTP token characters, empty type or subtype) fail token validation and return false.
mime_util.cc lines 161–175; WHATWG MIME Sniffing — XML MIME type.
PerformanceResourceTiming.contentType minimization — inputs and outputs
Inputs. During Fetch response handover, the browser minimizes the response’s parsed Content-Type MIME type before exposing it on the entry’s contentType attribute. The server’s raw HTTP Content-Type header (visible in DevTools Network panel and response.headers.get("content-type")) is NOT modified.
Outputs. Step 3 of minimize a supported MIME type still checks image/svg+xml first, so SVG stays "image/svg+xml". Step 4 checks whether the type is an XML MIME type and now minimizes non-application +xml responses to "application/xml":
HTTP Content-Type header | Chrome 160 contentType | Chrome ≤ 159 | Changed? |
|---|---|---|---|
text/example+xml | "application/xml" | "text/example+xml" (or "" if unsupported) | Yes |
image/example+xml | "application/xml" | "image/example+xml" (or "" if unsupported) | Yes |
font/example+xml | "application/xml" | "font/example+xml" (or "" if unsupported) | Yes |
TEXT/EXAMPLE+XML | "application/xml" | Not minimized via +xml | Yes (ASCII case-insensitive) |
text/example+xml; charset=utf-8 | "application/xml" | Not minimized via +xml | Yes (parameters stripped) |
image/svg+xml | "image/svg+xml" | "image/svg+xml" | No (explicitly preserved in step 3) |
application/atom+xml, application/rss+xml, application/xhtml+xml | "application/xml" | "application/xml" | No (already matched application/*+xml) |
text/xml, application/xml | "application/xml" | "application/xml" | No |
mime-types-minimized.json (added by WPT PR #62420); WHATWG MIME Sniffing — Minimize a supported MIME type.
Scope boundaries, Chrome Actor, and migration
Inputs and outputs. Changing blink::IsXMLMimeType behind SpecCompliantXmlMimeTypes intentionally does not alter Chromium’s separate MIMETypeRegistry::IsXMLMIMEType helper used by XMLHttpRequest document parsing, text decoding, direct navigation, and <object> embedding. Local Chromium 157 comparisons with SpecCompliantXmlMimeTypes disabled vs enabled confirmed identical behavior across all four paths.
- RUM / analytics migration: Telemetry or Real User Monitoring (RUM) pipelines that group resources by
PerformanceResourceTiming.contentTypewill see non-application+xmlassets bucketed under"application/xml"starting in Chrome 160 (including Android WebView). If you need the exact server MIME type for same-origin or CORS-exposed fetches, readresponse.headers.get("content-type")instead ofentry.contentType. - Chrome Actor navigation checks: Chrome Actor also calls
blink::IsXMLMimeTypein its dangerous-MIME-type navigation guard, so when both those checks andSpecCompliantXmlMimeTypesare active, additional non-application+xmlresponses (includingimage/svg+xml) may be blocked from Actor navigation. - Kill switch: Enterprise or local debugging can revert to legacy
application/*+xmlmatching via--disable-features=SpecCompliantXmlMimeTypeswhile the feature flag remains present.
Errors, invalid MIME types, and CORS filtering
PerformanceResourceTiming.contentType and blink::IsXMLMimeType never throw exceptions on malformed headers. Two non-XML return cases apply:
- Invalid MIME syntax: Headers that fail HTTP token validation (for example missing
/, illegal whitespace/delimiters, or empty type/subtype around+xml) are rejected bynet::MimeTypeValidationLevel::kWildcardSlashAndTokensand do not match as XML. - CORS / Timing-Allow-Origin gating: Cross-origin resources that fail the Resource Timing access check (no matching
Timing-Allow-Originheader) still report""(empty string) forcontentTyperegardless of whetherSpecCompliantXmlMimeTypesis enabled or the response has a+xmlsubtype. - Lifecycle & timing: Minimization runs once during Fetch response handover when creating the
PerformanceResourceTimingentry; existing entries are immutable, andPerformanceObserverdelivers them asynchronously after response completion.
contentType; Blink mime_util.cc.
Context and exposure
PerformanceResourceTiming.contentType is exposed in both Window and Worker contexts ([Exposed=(Window,Worker)]) without requiring a secure context, permission, or user activation. The underlying blink::IsXMLMimeType classification applies across Chrome desktop, Chrome for Android, and Android WebView.
performance_resource_timing.idl; ChromeStatus platform milestones (5092584283308032).
Examples
No interactive demo exists yet on the Chrome Platform Showcase for Chrome 160 (HEAD checked 404 on 2026-11-24). You can observe the minimized value directly via PerformanceObserver against any same-origin endpoint returning a non-application +xml Content-Type.
Inspecting minimized contentType for non-application +xml responses
// Observe Resource Timing entries for custom +xml MIME types (e.g. text/example+xml).
// Assumes the server responds with: Content-Type: text/example+xml; charset=utf-8
const observer = new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
if (entry.name.endsWith("/feed.xml")) {
// Chrome 160 (SpecCompliantXmlMimeTypes enabled via blink::IsXMLMimeType):
// entry.contentType === "application/xml"
// Note: image/svg+xml still reports "image/svg+xml".
console.log("Minimized Resource Timing contentType:", entry.contentType);
}
}
});
observer.observe({ type: "resource", buffered: true });
const response = await fetch("/feed.xml");
// The raw HTTP header is untouched:
console.log("Raw HTTP Content-Type:", response.headers.get("content-type"));
Source: WPT content-type-minimization.html; ChromeStatus debuggability walkthrough (5092584283308032).
Handling application/xml minimization in RUM / telemetry code
// Classify Resource Timing entries safely across Chrome 160+, Firefox, and older Chrome
// (where non-application +xml types like text/example+xml are not yet minimized,
// and while MIMETypeRegistry::IsXMLMIMEType for XHR stays unchanged).
function classifyResourceType(entry) {
const ct = entry.contentType; // "" when blocked by CORS/TAO or unsupported
if (!ct) return "unknown";
if (ct === "image/svg+xml") return "svg";
if (ct === "application/xml" || ct === "text/xml" || ct.endsWith("+xml")) {
// Matches both Chrome 160 ("application/xml") and Firefox ("text/example+xml")
return "xml";
}
return ct;
}
Source: WHATWG MIME Sniffing — Minimize a supported MIME type; ChromeStatus interop & WebView risks.
Browser compatibility
| Browser | Non-application +xml minimization | Base contentType (BCD) | Notes |
|---|---|---|---|
| Chrome (desktop, Android, WebView) | 160 | 148 | Enabled by default in Chrome 160 via SpecCompliantXmlMimeTypes (ChromeStatus API record) |
| Edge | 160 (mirror) | 148 | Chromium-based; BCD mirrors Chrome |
| Firefox | No (retains raw string) | 129 | Per ChromeStatus local testing on Firefox 157.0.1 (Oct 2026), XHR parses non-application +xml as XML, but PerformanceResourceTiming.contentType retains text/example+xml, image/example+xml, and font/example+xml; Mozilla confirmation pending on standards-positions#705 |
| Safari | Unsupported | No (false) | WebKit confirmed alignment on standards-positions#88 (MIME minimization is a condition of support), but PerformanceResourceTiming.contentType is not yet implemented in Safari (undefined in Safari 26.5; false in BCD) |
Security and privacy
MIME type minimization in Resource Timing exists specifically to reduce cross-origin and content-type fingerprinting while still distinguishing MIME types with different processing models (such as image/svg+xml vs generic XML). Updating blink::IsXMLMimeType does not rewrite HTTP response headers or bodies, does not select parsers or external handlers, and does not relax existing Timing-Allow-Origin / CORS checks governing PerformanceResourceTiming.contentType. In Chrome Actor, expanding blink::IsXMLMimeType means additional structured +xml MIME types (including image/svg+xml) can be blocked by dangerous-MIME-type navigation checks, reducing the risk of model ingestion and prompt-injection exfiltration of structured XML data. ChromeStatus lists formal Security and Privacy reviews as Pending (checked 2026-11-24).