HAR (HTTP Archive) (HAR)

Performance

A JSON file format that records all HTTP requests and responses made by a browser. Captures timing, headers, body sizes, and cache status. The standard way to share network waterfalls for debugging.

Updated Mar 9, 2026

Full Explanation

A HAR file is a complete recording of what happened on the network during a page load. Every request, every response, every redirect, every timing breakdown. It's the first thing you ask for when debugging CDN issues remotely: "send me the HAR."

HAR files show you exactly what's cached and what's not (check the response headers for X-Cache, CF-Cache-Status, Age), which requests are slow (look at the timing breakdown), and where the bottlenecks are (blocked, DNS, connect, TLS, waiting, download phases).

For CDN troubleshooting, the most useful parts of a HAR are: the cache status headers on each response, the TTFB for cache hits vs misses, whether resources are being served with compression, and whether there are unnecessary redirects eating up round trips.

Examples

# Export HAR from Chrome DevTools:
# 1. Open DevTools (F12) > Network tab
# 2. Load the page
# 3. Right-click > Save all as HAR with content

# Export HAR from curl (not standard, but useful)
$ curl -w '{"timings": {"dns": %{time_namelookup}, "connect": %{time_connect}, "tls": %{time_appconnect}, "ttfb": %{time_starttransfer}, "total": %{time_total}}}' -o /dev/null -s https://cdn.example.com/

# Analyze HAR with har-analyzer (npm)
$ npx har-analyzer report.har

# Key fields to check in HAR:
# response.headers: X-Cache, Age, CF-Cache-Status
# timings.wait: server processing time (TTFB)
# timings.blocked: time waiting in browser queue

Video Explanation

Frequently Asked Questions

A JSON file format that records all HTTP requests and responses made by a browser. Captures timing, headers, body sizes, and cache status. The standard way to share network waterfalls for debugging.

# Export HAR from Chrome DevTools:
# 1. Open DevTools (F12) > Network tab
# 2. Load the page
# 3. Right-click > Save all as HAR with content

# Export HAR from curl (not standard, but useful)
$ curl -w '{"timings": {"dns": %{time_namelookup}, "connect": %{time_connect}, "tls": %{time_appconnect}, "ttfb": %{time_starttransfer}, "total": %{time_total}}}' -o /dev/null -s https://cdn.example.com/

# Analyze HAR with har-analyzer (npm)
$ npx har-analyzer report.har

# Key fields to check in HAR:
# response.headers: X-Cache, Age, CF-Cache-Status
# timings.wait: server processing time (TTFB)
# timings.blocked: time waiting in browser queue

Related CDN concepts include: