v158 · mime sniffing · resource timing
The classification matrix
Eight fetches of the same XML body, each served by this site's own server under a different Content-Type — then the browser's real answer, read straight from PerformanceResourceTiming.contentType. No row is hard-coded: what you see is what this build classified.
Chrome ships the spec-compliant rule enabled by default in Chrome 158. On an earlier build, run Chrome with --enable-blink-features=SpecCompliantXmlMimeTypes, or flip chrome://flags/#enable-experimental-web-platform-features and relaunch. On a pre-158 build the highlighted rows scatter: text/*+xml reports its raw type, an unsupported image/* or model/* type reports an empty string — instead of the one application/xml bucket.
Served type → minimized type
Not run yet.
| served content-type | observed | what it shows |
|---|---|---|
| Press the button to run the matrix. | ||
code path
// Serve the same XML body under a chosen content type…
const url = "./serve?type=text/example%2Bxml&cachebust=" + Date.now();
await fetch(url, { cache: "no-store" });
// …then ask resource timing how the browser classified it.
const [entry] = performance.getEntriesByName(new URL(url, location.href).href);
entry.contentType;
// Chrome 158: "application/xml" (any valid */*+xml is an XML MIME type)
// pre-158: "text/example+xml" (raw type — only application/*+xml matched
// the rule; an unsupported image/*+xml gave "")