v158 · mime sniffing · resource timing

Serve your own subtype

The matrix page picks the types; here you do. Whatever you enter is genuinely served by this site's server as the response's Content-Type, then classified by this browser — including the server's real 400 when the string is not a valid MIME token.

Spec-compliant classification ships in Chrome 158. Earlier builds: --enable-blink-features=SpecCompliantXmlMimeTypes or chrome://flags/#enable-experimental-web-platform-features. On a pre-158 build a text/*+xml answer is its raw type (and an unsupported image/*+xml is an empty string) rather than application/xml.

Build a content type, serve it, classify it

The spec rule now covers all of these
Try one ending in +xml — or not, or something invalid
requested
—
server said
—
observed contentType
—
Nothing served yet.

this session's answers

code path

// The server route validates the MIME string against RFC 6838 token rules
// and serves an inert XML body under exactly that Content-Type:
//   GET ../serve?type=text%2Fvnd.demo%2Bxml   →  200, content-type: text/vnd.demo+xml
//   GET ../serve?type=not-a-mime              →  400 (never served)
// The page then reads performance.getEntriesByName(url)[0].contentType —
// the browser's minimized classification of what was actually served.

see also