13643 shaares
345 private links
345 private links
[I lost all my notes about this post]
In order to use this API with a cross-origin request, the server must provide the header Timing-Allow-Origin.
Going in-depth: the performance API can surface the server-timing header with performance.getEntriesByType('resource')[0].serverTiming.
Client-side use cases:
- inspecting Images And Other Asset Responses
- inspecting resources before Javascript run
- inspecting the current HTML document
- provides data about a request from a service worker