Notes:
The main items of importance to understand in this set of conformance criteria are the general concepts, using Web Storage for simple client-side storage tasks, and how cookies are used in positive and negative ways.
Learning outcomes:
-
Understand the concepts of client-side storage:
-
Know the common client-side data storage mechanisms — Web Storage API, cookies, Cache API, and the IndexedDB API.
-
Key use cases — maintaining state across reloads, persisting login and user personalization data, and local/offline working.
-
Understand the negative patterns associated with client-side storage — for example using cookies for tracking/fingerprinting.
-
Using cookies to store arbitrary data, normally controlled by HTTP headers.
-
Using Web Storage for simple key-value pair storage, controlled by JavaScript.
-
Using IndexedDB:
-
Complete client-side transactional database system.
-
Complex, and rarely used directly. You'd be more likely to use a library such as dexie.js.
-
Using Cache/Service Workers:
- Understand the basic ideas behind their usage in Progressive Web Apps (PWAs), and the fundamental use case of making a site work offline.
Notes:
IndexedDB and the Cache API (commonly used with Service Workers) are complex, and constitute huge topics. Exhaustively understanding them at this stage is not necessary, although we would suggest that you gain an understanding of the basics behind how they work.
Resources: