← Back to release summary

Content type in Resource Timing

Category
Performance
Type
New or changed feature
Status
In development (Chrome In development)
Intent stage
Evaluate readiness to ship

Summary

Adds the contentType field to PerformanceResourceTiming to hold a string corresponding to the content type of the fetched resource as returned by the server.

Motivation

Servers and CDNs sometimes "swap out" file formats transparently (URL doesn't change) based on User Agent string or Client Hints when responding to a request for a resource. By providing access to the content type in those cases it would be possible to knowing exactly which format has been used

Standards & signals

Samples: https://github.com/abinpaul1/resource-timing/blob/explainer-content-type/Explainers/Content-Type.md#api-changes-and-example-code

Explainers: https://github.com/abinpaul1/resource-timing/blob/explainer-content-type/Explainers/Content-Type.md

View on chromestatus.com