Unit 1 · Web architecture and protocols
Latency is the time a user waits for an operation; throughput is the amount of work transferred or completed over time. A page can have high throughput but poor interaction latency if the critical request is delayed. Measure DNS, connection, TLS, server wait, content download, parsing, and rendering separately.
Cache-Control: public, max-age=31536000, immutable
ETag: "course-466-v8"
If-None-Match: "course-466-v8"
HTTP/1.1 304 Not ModifiedFreshness headers tell caches when a stored response may be reused. Validators such as ETags let a client ask whether its stored copy is still current. A 304 response avoids retransmitting an unchanged body. Long-lived caching works best with versioned asset URLs; personalized or sensitive data usually needs private or no-store policy.
Reduce unnecessary bytes, avoid blocking work, compress suitable content, prioritize critical resources, and reuse connections. Do not optimize from intuition alone: use browser timing data, server metrics, and realistic network conditions.
1. What does a 304 response mean?
2. Which response should not normally be publicly cached?
3. What is a cache validator?
A sound policy gives versioned public assets a long immutable lifetime, allows public documentation to be reused for a bounded period, and marks personalized responses private or no-store. The performance budget should name measurable targets and identify the critical path. The comparison should record timing, transferred bytes, cache status, and any changed requests.