Unit 1 · Web architecture and protocols
The browser is a client that sends requests, stores cache entries and cookies, executes scripts, and renders representations. An origin server owns the resource and application rules. A reverse proxy sits in front of one or more origins and can terminate TLS, route requests, compress responses, enforce limits, and serve cached content. A CDN distributes cacheable assets closer to users.
Browser -> DNS -> CDN or reverse proxy -> origin server -> database
Browser <- response headers and body <- cache or originIntermediaries must respect cache and authorization rules. A public response may be cached broadly, while a personalized response needs private or no-store policy. The Origin request header and CORS response headers govern whether browser JavaScript may read a cross-origin response; CORS is not an authentication mechanism.
Developer tools expose method, URL, status, timing, request headers, response headers, transferred size, and initiator. Compare a cache hit with a network fetch. Look for Age, ETag, Last-Modified, Cache-Control, and Vary when diagnosing freshness.
1. Which component normally executes JavaScript and renders HTML?
2. Is CORS an access-control system for your API data?
3. Why might a cache refuse to share a response?
A public versioned CSS asset can use a long max-age and immutable naming. A private account page should use Cache-Control: private, no-store where appropriate. A proxy must forward identity and authorization context safely, avoid caching private responses for other users, and preserve the original request scheme and host only through trusted forwarding configuration.