Date Header Explained
What the HTTP Date header does and when it's used.
Published October 18, 2026
Date states the date and time the message was generated, in GMT HTTP-date format. Caches use it to compute response age.
How it works
Servers should set it from an accurate clock.
The Date header is part of the HTTP message and is case-insensitive in name.
In a real exchange
curl -i https://example.com/
Date: Wed, 21 Oct 2026 07:28:00 GMT
Practical examples
The header
Date: Wed, 21 Oct 2026 07:28:00 GMTSet or use it in code
new Date().toUTCString()Inspect it
curl -sI https://example.com | grep -i 'date'Common mistakes
- Wrong server clock
- Non-GMT time zones
- Wrong format
Key takeaways
- Date: Date states the date and time the message was generated, in GMT HTTP-date format.
- Check it in browser DevTools → Network.
- Test with curl -I before deploying.
FAQ
Why does clock accuracy matter?
Cache freshness, cookies and TLS depend on correct time.
Is Date case sensitive?
Header names are case-insensitive; values may not be.