Skip to main content

Background work, live channels, history and observers

Learn Background work, live channels, history and observers (Module 22 · Browser APIs and Storage, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Doing things in the background and watching the page • Web Workers : extra threads for heavy computation so the page stays responsive, like hiring a helper for the long calculation. • WebSockets : a persistent two-way line to the server (chat, live prices). • Server-Sent Events (SSE) : the server pushes updates one-way over normal HTTP (notifications, progress). • History API : history.pushState changes the URL without reloading; the Angular Router uses it for you, and the browser Back button fires popstate . • Intersection Observer : tells you when an element enters or leaves the viewport...

More lessons in Module 22 · Browser APIs and Storage