The request, response, cache, and discovery contracts visible at a static site’s edge.
Start here when a browser, cache, crawler, or proxy is receiving a response that needs to be explained. The series moves from representation and method semantics to caching, redirects, compression, and discovery.
Content-Type should describe the bytes you actually send
A filename is only a hint; the response header is the browser-facing contract for the representation.
HEAD should describe the same representation as GET
HEAD is a metadata view of GET; status and representation headers should tell the same story.
Range requests should prove which bytes were selected
A 206 response is useful only when its boundaries and total size describe the bytes that were returned.
Cache headers are a contract with two clocks
Separate browser freshness from origin validation, then verify the response headers that implement both.
Compression changes the selected HTTP representation
Test compressed and uncompressed requests separately so caches and validators describe the bytes actually served.
Redirects and error codes should preserve the story
Check the method, Location header, and cache behavior before choosing a redirect or an error status.
robots.txt and sitemaps answer different questions
robots.txt is a crawler-facing preference; a sitemap is a URL inventory; neither is an authorization layer.