v148 · Performance · Web APIs

Content type in Resource Timing

The PerformanceResourceTiming interface gains a contentType property — a normalised MIME type string reflecting the server's Content-Type header. Filter, group, and analyse what your page actually loaded.

concepts

  1. Live Resource Inspector

    Load this page and see every sub-resource's contentType printed in a live table — script, stylesheet, font, image. Trigger fresh fetches and watch new rows appear.

    Live API PerformancObserver
  2. Resource Breakdown Chart

    A bar chart that groups the current page's resource timing entries by contentType, showing count and total transfer bytes per type. Click a type to drill into individual entries.

    Live API Resource Timing
  3. MIME Type Audit

    Full audit of every resource loaded by this page — grouped by MIME category, visualised as a donut chart, and filterable by type. Flags unexpected content types and shows which resources match their expected MIME type.

  4. MIME Type Performance Analyzer

    Fetches 8 resource types (HTML, CSS, JS, JSON, image, font, video, wasm) and groups them by contentType from PerformanceResourceTiming. Bar charts compare average load time and transfer vs decoded size ratio per MIME type. A resource audit section flags anomalies — e.g. a .js file served as text/html. Live PerformanceObserver for resource entries reads the new contentType property.

  5. RUM Dashboard

    A content-type-aware Real User Monitoring dashboard. Captures all PerformanceResourceTiming entries from the current page, groups them by contentType, and displays count, total KB transferred, and average duration per MIME category with horizontal bar charts. Filter by type, drill into individual entries, and see the summary stats a production RUM SDK would send.

why it shipped

Resource Timing has always let developers measure how long sub-resources took to load, but it never told you what kind of thing was loaded. Developers who wanted to distinguish scripts from stylesheets from fonts had to match URLs against file extensions — a heuristic that breaks for CDN URLs, data URIs, and server-generated resources. The new contentType property closes this gap: it returns the standardised MIME type from the server's Content-Type response header, giving RUM analytics, bundle auditors, and performance dashboards a reliable signal they've always needed.

references

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗