Browser Storage, Caching, and Networking
Browsers can remember data in different places. Each option has a purpose, a size limit, and a security or lifetime tradeoff.
Think of browser storage like school storage spaces: a desk drawer for this class, a locker for your own items, and an office register for things that must travel with every form.
Topic practice prompts
localStorage is persistent and browser-side, sessionStorage is tab-scoped, and cookies are small values sent with matching HTTP requests.
- Why is localStorage risky for sensitive data?
- When would cookies be preferable?
Caching can make apps feel fast, but the UI must still handle old data, refresh timing, and clear signals about what is fresh or stale.
- What is stale-while-revalidate in simple words?
- How would you show stale state in the UI?
Last-day revision lines
- localStorage is persistent but synchronous.
- sessionStorage is per-tab.
- Cookies travel with requests.
- Cache rules shape perceived speed.
- JS interview preparation: context/JS Interview Preparation Questions.docx
- Web performance and security: context/Web perfomance and security.docx
Local resource packs for this topic
Use these local packs when you want broader official-source context without leaving the app.
JavaScript Runtime and Closures
A local offline guide to the JavaScript runtime ideas interviewers repeatedly use for JS and browser rounds.
Closures, lexical scope, event loop, microtasks, timers, promise ordering, and DOM callback behavior.
Open local study packRelated topics to study after this one
Frontend Security, Auth, and Trust Boundaries
Explain XSS, CSRF, token storage, CSP, sanitization, and what frontend can and cannot guarantee.
Simple mode, interview mode, example, pitfalls, and follow-ups are all inside this topic.
Realtime Dashboards and Resilient Data Flow
Prepare for questions about polling, websockets, partial failure, stale data, and resilient UI updates.
Simple mode, interview mode, example, pitfalls, and follow-ups are all inside this topic.
Loading Strategy, Caching, and Core Web Vitals
Answer LCP, CLS, INP, image strategy, caching, and bundle questions with product-level clarity.
Simple mode, interview mode, example, pitfalls, and follow-ups are all inside this topic.