Core concepts across the HTTP lifecycle, markup & styling, JavaScript runtime, client-server contracts, performance, state & security.
The stateless request-response transport for nearly all web interactions.
Method, path, version, headers, optional body. Keep-Alive persists TCP.
GET/PUT/DELETE idempotent; POST not. Safety & caching strategies rely on semantics.
2xx success, 3xx redirect, 4xx client, 5xx server. Use narrowly (422 vs 400).
Multiplexing, header compression (HPACK), reduced latency; QUIC (UDP-based) for HTTP/3.
GET /api/items HTTP/1.1
Host: example.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: max-age=60
[{"id":1,"name":"Widget"}]
Semantic structure + progressive enhancement improves resilience & SEO.
.cards { display:grid; gap:1rem; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); }
Event loop orchestrates call stack, task queues & microtasks (Promise jobs).
Single-thread event loop; concurrency via async IO; Web Workers for isolation.
ESM: static import graph enabling tree-shaking; dynamic import() for code splitting.
DOM diffing (virtual DOM libs) optimize minimal real DOM mutations.
FCP, LCP, CLS, TTI guide UX latency & stability goals.
Call Stack <= synchronous frames
|__ Microtask Queue (Promises)
|__ Task Queue (timers, IO)
Rendering (frame) ~16ms budget
Design for evolvability and predictable data flows.
# Favor explicit media types OR URL prefix
Accept: application/vnd.service.v2+json
Static simulations / generators (no network calls).
Quick reference for high-impact improvements.
Minimize blocking CSS/JS
Inline above-fold CSS
Defer non-critical scriptsCache-Control: max-age
ETag / If-None-Match
Immutable assets w/ hashesUse AVIF/WebP
Lazy load (loading="lazy")
Serve responsive srcsetCode splitting (dynamic import)
Tree-shake unused modules
Remove polyfill duplicationContent-Security-Policy
X-Frame-Options: DENY
Strict-Transport-Securityaria-label clarity
Focus outline visible
Semantic headings orderChecklist & conceptual Q&A.
XSS can exfiltrate tokens; HttpOnly cookies reduce exposure (with CSRF mitigations).
Layout-affecting changes (dimensions, fonts). Minimize by batching and using transforms for animation.
Cookies auto-sent with requests (size/expiry constrained); localStorage stays client-side until accessed.
Client selects specific fields; reduces payload size vs fixed REST responses.