Module 15 ¡ Forms, Storage and Small Apps
Under the Hood: Origins, the Storage Event, the Main Thread and Cookies
ProReading
Arif's note taker from Lesson 03 is a success, and success brings new questions. A student opens it in two tabs, edits in one, and the other tab shows old notes. Another student pastes three thousand notes in, and every key press now stutters. A friend asks why the site's cookies are "slowing down every picture". Each question has its answer below the API, in how the browser keeps and moves this data.
Checking what this lesson needs for youâĻ
What is inside Under the Hood: Origins, the Storage Event, the Main Thread and Cookies
- Storage belongs to an origin
- The storage event, from tab to tab
- A model of the rule, run under Node
- Synchronous on the main thread
- Lab: what a big save costs
- Saving less often
- What a cookie carries
- How JSON.stringify walks a state
- structuredClone and the stores that keep objects
- A Date is one number, and digits are a choice