The HTTP Server-Timing header is a response-type header. This header is used to communicate between two or more metrics and descriptions for a given request-response cycle from the user agent. The HTTP Server-Timing header is useful to any back-end server timing metrics like read or write in any databases, accessing files, etc. It can be used in the developer tools to keep track of the server on the PerformanceServerTiming interface. The HTTP Server-Timing helps to perform in different ways to communicate with the metrics, those are listed below:
- metrics name
- metric with value
- metric with description
- metric with value and description
Server-Timing: metricsname| metricsvalue | metrcisdescription
Directives: There are no directives only need to mention the metrics name with all the details.
- This example shows the single metrics.
- This example shows the single metrics with the value.
Server-Timing: edge; dur=33
- This example shows the single metrics with description.
Server-Timing: cdn-cache; desc=HIT
- This example shows the double metrics with description and value.
Server-Timing: cdn-cache; desc=HIT, edge; dur=1
To check this Server-Timing in action go to Inspect Element -> Network check the response header for Server-Timing like below, Server-Timing is highlighted.
Supported Browsers: The browsers compatible with HTTP headers Server-Timing are listed below:
- Google Chrome
- HTTP headers | Access-Control-Expose-Headers
- HTTP headers | Access-Control-Allow-Headers.
- HTTP headers | Age
- HTTP headers | Allow
- HTTP headers | Via
- HTTP headers
- HTTP Headers | TE
- HTTP headers | If-None-Match
- HTTP headers | Trailer
- HTTP headers | X-Forwarded-For
- HTTP headers | Want-Digest
- HTTP headers | Accept
- HTTP headers | Retry-After
- HTTP headers | Digest
- HTTP headers | Range
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.