Every HTTP response includes headers — small pieces of metadata that describe the content and the rules for using it. When viewing source, headers explain why a page loads (or doesn’t) and what format you’re looking at.
Key headers to know
- Status:
200 OK,301 Moved Permanently,404 Not Found, etc. - Content-Type:
text/html; charset=utf-8tells you it’s HTML; JSON/XML/images will differ. - Content-Encoding: gzip or br (Brotli) compression.
- Cache-Control and ETag: caching behaviour.
- Content-Security-Policy (CSP): where content may load/execute.
- X-Robots-Tag or meta robots: indexing/crawling hints.
Using a header inspector
A header inspector shows status, size, type, and selected security directives above the source. It helps diagnose blank pages, mismatched encodings, or non-HTML responses at a glance.
Examples
- JSON API returning
application/json— you’ll see JSON, not HTML. - SPA returning minimal HTML — the “real” content is rendered on the client.
- Redirect chains — watch for
301/302hops before the final HTML.