ETag response header
- Job
- Names the version the server just sent
The ETag header labels one version of a resource so browsers and crawlers can revalidate with If-None-Match and get a 304. Syntax, weak vs strong, and a check.
An ETag is an HTTP response header that identifies one version of a resource. A client stores it, then sends it back in If-None-Match when the cached copy goes stale. If the version is unchanged, the server answers 304 Not Modified with no body, so nothing is re-downloaded.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
Last-Modified date.ETag response headerIf-None-Match request header304 Not Modified200 OKIf-Match request header412 Precondition FailedGET /guide HTTP/1.1
HTTP/1.1 200 OK
ETag: "33a64df5"
Cache-Control: max-age=3600
(an hour later, cached copy is stale)
GET /guide HTTP/1.1
If-None-Match: "33a64df5"
HTTP/1.1 304 Not Modified
ETag: "33a64df5""abc123"W/"abc123"Last-ModifiedMDN notes that weak ETags prevent caching when byte-range requests are used, while strong ETags let range responses still be cached. Per MDN's conditional requests guide, If-None-Match uses weak validation and If-Match uses strong validation. The choice of validator and the strength of validation are independent.
Run it against your own URL. If the second line prints 200 instead of 304, the server isn't honoring If-None-Match, or something in front of it changed the ETag. Not every site sends an ETag at all, so an empty first line is a finding too.
U=https://developer.mozilla.org/en-US/
E=$(curl -sI $U | grep -i '^etag' | cut -d' ' -f2- | tr -d '\r')
echo "$E"
curl -s -o /dev/null -w "%{http_code}\n" -H "If-None-Match: $E" $U # 304 means the validator works
curl -s -o /dev/null -w "%{http_code}\n" $U # 200 without the headerAn ETag only saves transfer on a repeat request, and it doesn't replace freshness rules. See HTTP caching for how Cache-Control decides when a cached copy needs checking at all.
2 questions people ask next, answered from the sources on this page.
Both are validators. Last-Modified is a date, while an ETag is an opaque string the server generates for each version. Clients can send either back, in If-Modified-Since or If-None-Match, to revalidate a stale copy.
No. A conditional request is any request whose outcome depends on a precondition header. An ETag is one of the two validators those preconditions compare against, the other being Last-Modified.
The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.