W3C Server Timing Header and API

I used custom headers in the past to send some metrics over to the client–mostly for debugging purposes to quickly differentiate between client and server issues on slow web request and/or web application performance.

While that was working out pretty well I like standards and even if I did not tell anybody I always wanted such a thing built into HTTP.

A W3C standard is on the way: Server Timing

It consists of a spec how the HTTP Header is constructed:

And a client side API for JavaScript:

Of course not all browsers support it yet

image

But Chrome 65–at the time of writing in the beta channel–does so:

image

Even without any extra JavaScript you can inspect the numbers sent with the header in the Network tab of the DevTools:

image

Add comment

Loading