Chapter 12: Working with data
The chapter introduces working with data in Vanilla Web by contrasting framework-packaged data features with solutions assembled from browser primitives.
After this chapter you will be able to
- Vanilla Web data responsibilities. Explain that Vanilla Web apps still need to handle data concerns that frameworks often package together, but assemble their solutions from smaller browser primitives.
- Fetch API request model. Describe Fetch as the default way modern web apps communicate with HTTP services, using a Promise-based interface that treats requests and responses as objects.
- Response headers and body timing. Explain that the fetch() promise resolves once response headers arrive, while json(), text(), and blob() wait for the body to be read; describe streaming as a way to read body data earlier.
- Fetch request and response. Describe what fetch() accepts and what it returns, then trace the basic flow from a JSON request to usable JavaScript data.
- HTTP errors versus rejections. Distinguish a rejected fetch() Promise from an HTTP error response, and explain how to detect the latter.
- HTTP method choice. Explain how to set a request method in fetch() and what the common HTTP methods communicate to the server.
- JSON request body preparation. Describe what to do when sending JSON in a request body.
- FormData uploads and headers. Explain when to use FormData, how to populate it, and why its Content-Type header should be left to the browser.
- Fetch credential choices. Explain how fetch() handles credentials by default and when to use same-origin, include, or omit.
- Cross-origin credential requirements. State what server response is required for a credentialed cross-origin fetch() request and why a wildcard origin is insufficient.
- Response body reader selection. Explain that the response body’s format determines how to read it: use response.json() for JSON APIs, while text, files, and binary payloads call for their own methods.
- Single consumption and cloning. Explain why a response must be cloned before reading when two consumers need its body, such as when one inspects it and another forwards or caches it.
- Stale request cancellation. Explain how an AbortController prevents an earlier request from updating the UI after the user has moved on. Describe why cancellation, rather than debouncing alone, protects search results.
- Explicit request states. Describe the initial, loading, ready, empty, and error states of a UI request, and explain why naming them helps organize DOM updates.
- Optimistic update safeguards. Explain how an optimistic UI update works and when it is appropriate or risky.
- Incremental fetch response reading. Explain how a fetch response can be read as a text stream so an interface can show data before the full response arrives, and why the server must send data incrementally too.
- NDJSON line buffering. Explain why JSON cannot generally be parsed one network chunk at a time and how an NDJSON reader buffers incomplete lines while parsing complete objects.
- Download progress estimates. Explain how Content-Length can support a download progress estimate and why compression can make that estimate inaccurate.
- Upload progress API choice. Distinguish fetch() from XMLHttpRequest for upload progress and describe the limited browser support for streamed-request alternatives.
- Persistent bidirectional connections. Distinguish a WebSocket connection from the request/response exchanges of fetch() and XMLHttpRequest, and explain when repeated server updates make a WebSocket useful.
- Socket events and lifecycle. State the four core events of a minimal WebSocket client and describe the operational handling a connection needs, especially explicit cleanup by a component that owns it.
- In-flight request deduplication. Explain how a short-lived in-memory cache can share one in-flight request among concurrent callers, and describe its failure and cancellation caveats.
- Cache freshness and invalidation. Describe the simple rules this section gives for deciding when cached data should be discarded or fetched again.
- Choosing storage by data shape. Explain why some data should persist beyond a page session and why the kind of data matters when choosing browser storage. Describe examples of different data shapes the section asks readers to consider.
- Browser storage scope and partitioning. Explain that browser storage belongs to a browser-controlled security context, commonly scoped by origin, but that the same site may have separate storage across clients, devices, or privacy contexts.
- Local data retention assumptions. Describe the safe architectural assumption for browser storage: data might be available later in a compatible context, but it does not automatically sync and can disappear. Explain the recommendation for important data.
- Storage by data type. Apply the section’s rules to choose a storage API for small settings, structured or offline data, network responses, user documents, and private file-like data.
- Origin storage quotas. Explain that browser storage is limited by an origin quota whose size varies, and distinguish examples of data normally counted toward it from data normally excluded.
- Best effort and persistent storage. Distinguish best-effort storage from persistent storage, including what persistence protects against and what it cannot prevent.
- Storage API estimates and requests. Describe what the Storage API reports and controls, which methods inspect quota and persistence, and why estimates and persistence requests are not guarantees.
- Appropriate Web Storage uses. Justify using Web Storage for tiny, string-based values that are cheap to rebuild, rather than as a primary database. Explain why IndexedDB is preferable for structured or offline records and needs such as asynchronous or worker access.
- IndexedDB as application database. Explain when to use IndexedDB and why it is more than a larger localStorage.
- Object stores keys and indexes. Describe how an IndexedDB database organizes entries and supports lookups.
- Versioned database upgrades. Explain what happens when an app opens a database with a higher version and why that matters.
- Cache Storage data model. Explain that Cache Storage stores complete HTTP responses, including headers and body, under Request keys, and distinguish this URL-based model from records better suited to IndexedDB.
- Cached response updates. Explain why cached files need an explicit update strategy when their server versions change, and name an approach the section mentions.
- User-owned document storage. Explain why a saved project, exported report, or text document calls for different storage from app-owned data, and describe how the File System Access API lets users choose files or directories and grant read or write permission.
- Origin-private file distinction. Distinguish the Origin Private File System from user-selected files, including their visibility, need for document selection, and different quota treatment.
- Storage debugging with DevTools. Explain why storage debugging should involve inspecting browser storage in DevTools rather than assuming a write succeeded or guessing what the app stored.
- Stored data lifecycle planning. Explain why an app must validate restored data and plan for schema changes and server copies rather than relying on the browser to manage those concerns.
What it builds on
- Data Storage (chapter 2) · Introduces browser data storage as an app capability.
Section by section
Introduction
The chapter introduces working with data in Vanilla Web by contrasting framework-packaged data features with solutions assembled from browser primitives.
- Vanilla Web data responsibilities: Explain that Vanilla Web apps still need to handle data concerns that frameworks often package together, but assemble their solutions from smaller browser primitives.
Why it matters: This distinction frames why the chapter treats data work as a set of concerns rather than one framework feature.
Key terms: Vanilla Web, browser primitives, data-related concerns
12.1 Working with HTTP
Introduces Fetch as the browser’s standard HTTP interface and explains when its promise resolves relative to reading the response body.
- Fetch API request model: Describe Fetch as the default way modern web apps communicate with HTTP services, using a Promise-based interface that treats requests and responses as objects.
Why it matters: This is the basic model behind the HTTP examples that follow. - Response headers and body timing: Explain that the fetch() promise resolves once response headers arrive, while json(), text(), and blob() wait for the body to be read; describe streaming as a way to read body data earlier.
Why it matters: It prevents you from treating an available response as an already-read body.
Key terms: Fetch API, Promise-based interface, request, response, fetch() promise, response headers, json(), text(), blob(), response body
12.1.1 Basic usage
This section introduces the basic Fetch API workflow for JSON requests and explains two response-handling pitfalls.
- Fetch request and response: Describe what fetch() accepts and what it returns, then trace the basic flow from a JSON request to usable JavaScript data.
Why it matters: It gives you the basic sequence for turning a server reply into data your code can use. - HTTP errors versus rejections: Distinguish a rejected fetch() Promise from an HTTP error response, and explain how to detect the latter.
Why it matters: A request can complete at the network level without succeeding at the HTTP level. - JSON parsing and reusable helper: Explain why JSON parsing belongs in a reusable request helper and what limits repeated reading of a response body.
Why it matters: Centralizing repeated request handling helps avoid inconsistent checks and attempts to reread an already consumed body.
Key terms: Fetch API, request URL, request settings, Promise, Response, response body, fetch(), response.ok, response.status, TypeError
12.1.2 Sending data
This section explains how to choose an HTTP method and send JSON or FormData in a fetch() request.
- HTTP method choice: Explain how to set a request method in fetch() and what the common HTTP methods communicate to the server.
Why it matters: Choosing a method that matches the request's intent keeps client code aligned with HTTP conventions. - JSON request body preparation: Describe what to do when sending JSON in a request body.
Why it matters: Preparing the body and content type tells the server what kind of data the request carries. - FormData uploads and headers: Explain when to use FormData, how to populate it, and why its Content-Type header should be left to the browser.
Why it matters: Letting the browser set FormData's header avoids an invalid file-upload request.
Key terms: fetch(), method, GET, POST, PUT, PATCH, JSON, request body, content type, FormData
12.1.3 Credentials and cookies
This section explains when fetch() sends credentials and what a server must allow for credentialed cross-origin requests.
- Fetch credential choices: Explain how fetch() handles credentials by default and when to use same-origin, include, or omit.
Why it matters: The choice determines whether cookies or HTTP credentials accompany a request. - Cross-origin credential requirements: State what server response is required for a credentialed cross-origin fetch() request and why a wildcard origin is insufficient.
Why it matters: Client-side opt-in cannot make a credentialed cross-origin request work without the server’s explicit permission.
Key terms: fetch(), credentials, same-origin, include, omit, CORS headers, Access-Control-Allow-Origin, Access-Control-Allow-Credentials
12.1.4 Headers and response parsing
Explains how to choose a Fetch response-body reader, handle the newer bytes() method, and clone a response when its body needs two consumers.
- Response body reader selection: Explain that the response body’s format determines how to read it: use response.json() for JSON APIs, while text, files, and binary payloads call for their own methods.
Why it matters: Matching the reader to the payload lets your code handle the data it receives. - Bytes method compatibility: Describe why code supporting older browsers should feature-detect bytes() or fall back to arrayBuffer().
Why it matters: A fallback prevents use of a newer response method from breaking older-browser support. - Single consumption and cloning: Explain why a response must be cloned before reading when two consumers need its body, such as when one inspects it and another forwards or caches it.
Why it matters: Cloning lets separate parts of an application use a response without the first read preventing the second.
Key terms: response body, response.json(), bytes(), Baseline Newly available, arrayBuffer(), feature-detect, consumed, clone the response, service workers
12.1.5 AbortController and stale requests
This section explains how to cancel stale HTTP requests and use timeouts or multiple cancellation conditions.
- Stale request cancellation: Explain how an AbortController prevents an earlier request from updating the UI after the user has moved on. Describe why cancellation, rather than debouncing alone, protects search results.
Why it matters: Cancellation keeps an outdated response from replacing the result the user currently needs. - Request timeouts and errors: Describe how AbortSignal.timeout() sets a request deadline, what error name its cancellation produces, and how to achieve timeout behavior on older browsers.
Why it matters: Recognizing timeout cancellations helps error handling distinguish them from other failures. - Combined cancellation conditions: Explain how AbortSignal.any() lets more than one condition cancel a request.
Why it matters: One request may need to stop for several independent reasons.
Key terms: AbortController, abort(), stale requests, debouncing, AbortSignal.timeout(), TimeoutError, AbortError, setTimeout(), AbortSignal.any()
12.1.6 Request lifecycle
This section treats HTTP requests as explicit UI lifecycles and explains how state, optimistic updates, retries, and cancellation affect what users see.
- Explicit request states: Describe the initial, loading, ready, empty, and error states of a UI request, and explain why naming them helps organize DOM updates.
Why it matters: Explicit states make it easier to decide what the interface should show throughout a request. - Previous data during loading: Explain when to keep previous data visible during loading and when to clear it, and describe why that choice should be explicit in state.
Why it matters: The right loading display depends on whether continuity or avoiding stale information matters more. - Optimistic update safeguards: Explain how an optimistic UI update works and when it is appropriate or risky.
Why it matters: A faster-feeling interface is only beneficial if a failed update can be recovered from safely. - Safe request retries: Distinguish retrying a temporary GET failure from retrying a POST, including the risk of duplicate writes.
Why it matters: A retry intended to recover from failure should not accidentally perform the same write twice. - Request cancellation ownership: Describe who should cancel requests tied to routes, components, and inputs.
Why it matters: Putting cancellation with the request’s owner helps prevent work from continuing after its UI context changes.
Key terms: request lifecycle, initial state, loading state, ready state, empty state, error state, previous data, loading, stale data, state
12.1.7 Streaming responses
Explains how to read fetch responses incrementally, including how to handle text chunks and newline-delimited JSON.
- Incremental fetch response reading: Explain how a fetch response can be read as a text stream so an interface can show data before the full response arrives, and why the server must send data incrementally too.
Why it matters: Streaming can make useful content visible while a large or long-running response is still arriving. - NDJSON line buffering: Explain why JSON cannot generally be parsed one network chunk at a time and how an NDJSON reader buffers incomplete lines while parsing complete objects.
Why it matters: Buffering by message boundary prevents parsing failures when a network chunk ends partway through an object. - Response body consumption: Explain why reading a streamed response prevents a later body-reading call on that same response, and what to do if multiple consumers need it.
Why it matters: It prevents code from trying to parse a body that its stream reader has already consumed. - Stream compatibility fallback: Describe the fallback for reading a ReadableStream in browsers that do not support asynchronous iteration over it.
Why it matters: The same incremental-reading approach can work where direct asynchronous stream iteration is unavailable.
Key terms: fetch(), Response body, ReadableStream, TextDecoderStream, newline-delimited JSON (NDJSON), network chunks, buffer, response.json(), response.text(), clone
12.1.8 Uploads, downloads, and progress
Explains when download progress can be estimated from a streamed response and why precise upload progress may require an API other than fetch().
- Download progress estimates: Explain how Content-Length can support a download progress estimate and why compression can make that estimate inaccurate.
Why it matters: It helps you avoid showing misleading download progress. - Upload progress API choice: Distinguish fetch() from XMLHttpRequest for upload progress and describe the limited browser support for streamed-request alternatives.
Why it matters: It helps you choose an upload approach that can provide the progress feedback you need.
Key terms: Content-Length, streaming, indeterminate progress indicator, fetch(), XMLHttpRequest, upload progress events, ReadableStream, duplex: "half", Baseline
12.2 Working with WebSockets
This section explains when to use WebSockets, what a minimal client must handle, and how WebSockets compare with other real-time communication options.
- Persistent bidirectional connections: Distinguish a WebSocket connection from the request/response exchanges of fetch() and XMLHttpRequest, and explain when repeated server updates make a WebSocket useful.
Why it matters: The connection model helps you decide whether ordinary HTTP requests fit an application’s updates. - Socket events and lifecycle: State the four core events of a minimal WebSocket client and describe the operational handling a connection needs, especially explicit cleanup by a component that owns it.
Why it matters: A live connection needs more care than simply receiving messages. - Real-time protocol choices: Distinguish the communication needs served by WebSockets, Server-Sent Events, WebRTC, and WebTransport at the level described here.
Why it matters: Not every real-time feature calls for a WebSocket.
Key terms: WebSockets, persistent, bidirectional connection, request/response model, open, message, error, close, connection lifecycle handling, cleanup, Server-Sent Events (SSE)
12.3 Remote data and local caches
Explains how to avoid unnecessary remote requests while keeping cached data fresh and choosing an appropriate cache.
- In-flight request deduplication: Explain how a short-lived in-memory cache can share one in-flight request among concurrent callers, and describe its failure and cancellation caveats.
Why it matters: Sharing requests saves duplicate work, but callers also share the consequences of failure or cancellation. - Cache freshness and invalidation: Describe the simple rules this section gives for deciding when cached data should be discarded or fetched again.
Why it matters: Without a clear freshness rule, a fast cache can serve incorrect data after it changes. - Cache choice by data type: Distinguish the cache options the section recommends for application records versus static resources and network responses, including the limits of fetch() cache behavior.
Why it matters: Matching the cache to the kind of data makes caching decisions easier to reason about.
Key terms: in memory cache, Promise, in-flight request, signal, freshness, invalidation, page session, timestamps, HTTP caching headers, browser cache
12.4 Data persistence
Introduces browser data persistence as a choice among storage mechanisms suited to different kinds of data.
- Choosing storage by data shape: Explain why some data should persist beyond a page session and why the kind of data matters when choosing browser storage. Describe examples of different data shapes the section asks readers to consider.
Why it matters: Thinking about what you need to store helps you choose an appropriate browser storage mechanism.
Key terms: data persistence, storage mechanisms, shape of the data
12.4.1 Where browser storage lives
Explains where browser-stored data is scoped, why it may not be shared or retained, and how to design around those limits.
- Browser storage scope and partitioning: Explain that browser storage belongs to a browser-controlled security context, commonly scoped by origin, but that the same site may have separate storage across clients, devices, or privacy contexts.
Why it matters: It prevents an app from assuming that opening the same site always reveals the same local data. - Local data retention assumptions: Describe the safe architectural assumption for browser storage: data might be available later in a compatible context, but it does not automatically sync and can disappear. Explain the recommendation for important data.
Why it matters: It helps you avoid making the browser's local copy the only copy of important data. - Namespacing same-origin app storage: Explain why separate apps hosted under one origin should prefix their storage names and keys.
Why it matters: Distinct prefixes make accidental clashes between same-origin apps less likely.
Key terms: security context, bucket, origin, storage bucket, partitioning, local data, synchronize, export, storage pressure, prefix
12.4.2 Choosing a storage API
This section gives practical rules for choosing browser storage based on the kind of data, while distinguishing cookies and deprecated storage APIs from current options.
- Storage by data type: Apply the section’s rules to choose a storage API for small settings, structured or offline data, network responses, user documents, and private file-like data.
Why it matters: Matching storage to the data helps you choose an API without treating every option as interchangeable. - Cookies for HTTP state: Distinguish cookies from general application storage and describe their intended use here.
Why it matters: Cookies serve a different purpose from the browser storage choices in this section. - Deprecated storage replacements: Distinguish deprecated AppCache and WebSQL from their modern replacements, and state the option mentioned for browser SQL.
Why it matters: Knowing which older APIs to avoid helps you select a current approach.
Key terms: Web Storage, IndexedDB, Cache Storage, file system, OPFS, Cookies, HTTP state, session coordination, Application Cache (AppCache), WebSQL
12.4.3 Quotas and persistence
This section explains browser storage quotas, eviction and persistence, how to inspect storage status, and the limits of client-side storage.
- Origin storage quotas: Explain that browser storage is limited by an origin quota whose size varies, and distinguish examples of data normally counted toward it from data normally excluded.
Why it matters: You cannot assume every browser gives an app the same amount of storage or counts every kind of browser data in the same quota. - Best effort and persistent storage: Distinguish best-effort storage from persistent storage, including what persistence protects against and what it cannot prevent.
Why it matters: Persistence can improve offline data retention without being a guarantee that the data will survive everything. - Storage API estimates and requests: Describe what the Storage API reports and controls, which methods inspect quota and persistence, and why estimates and persistence requests are not guarantees.
Why it matters: These checks help an offline app plan for available space without mistaking an estimate or request for a promise. - Client-side storage exposure: Explain why browser storage should not be treated as a secure vault and state the section's precautions for authentication data.
Why it matters: Keeping data in the browser does not make it secret from users or scripts running on the site. - Experimental Storage Buckets proposal: Describe the proposed purpose of Storage Buckets and their availability limitation.
Why it matters: Separating critical data from disposable caches could help a browser reclaim less important data first, where the feature is available.
Key terms: quota, origin, IndexedDB, Cache Storage, best effort, persistent storage, storage pressure, evict, Storage API, navigator.storage.estimate()
12.4.4 Web Storage
This section explains when Web Storage is appropriate, how its values and lifetimes work, and how storage changes can be observed across tabs.
- Appropriate Web Storage uses: Justify using Web Storage for tiny, string-based values that are cheap to rebuild, rather than as a primary database. Explain why IndexedDB is preferable for structured or offline records and needs such as asynchronous or worker access.
Why it matters: Choosing storage by the data and access needs helps avoid blocking the main thread or relying on Web Storage as a database. - String key and value storage: Describe the shared key/value model of localStorage and sessionStorage and what must happen when storing an object.
Why it matters: Treating stored objects as strings prevents confusion about what Web Storage actually retains. - Local and session lifetimes: Distinguish how long localStorage and sessionStorage retain values, including the uncertainty around what counts as a browsing session.
Why it matters: The two APIs have different retention expectations, especially when a session may be restored. - Cross-tab storage events: Explain which contexts receive a storage event after a write and how the writing tab can respond to its own change.
Why it matters: Knowing who receives the event avoids a common gap in tab-syncing code.
Key terms: Web Storage, IndexedDB, synchronous, localStorage, sessionStorage, string keys, string values, serialize, browsing session, storage event
12.4.5 IndexedDB
This section explains when IndexedDB is appropriate, how it organizes and versions application data, and what to expect from its API.
- IndexedDB as application database: Explain when to use IndexedDB and why it is more than a larger localStorage.
Why it matters: This distinction helps you choose storage that fits structured application data. - Object stores keys and indexes: Describe how an IndexedDB database organizes entries and supports lookups.
Why it matters: Stores, keys, and indexes are the basic vocabulary for organizing and finding records. - Versioned database upgrades: Explain what happens when an app opens a database with a higher version and why that matters.
Why it matters: Versioned upgrades give an evolving app a place to change its local database structure. - Transactions and API ergonomics: Describe how reads and writes are performed and why an app might use a wrapper.
Why it matters: This explains both the basic access pattern and why production code often wraps the raw API. - Structured cloning and record size: Explain the storage benefit and cost of structured cloning, and the practical guidance given.
Why it matters: Structured storage is useful, but record size and lookup choices still affect the work an app does.
Key terms: IndexedDB, structured data, NoSQL database, object stores, key, keyPath, auto-incrementing key generator, indexes, version, upgrade step
12.4.6 Cache Storage
This section explains when Cache Storage fits network-shaped data and why cached responses need an explicit update strategy.
- Cache Storage data model: Explain that Cache Storage stores complete HTTP responses, including headers and body, under Request keys, and distinguish this URL-based model from records better suited to IndexedDB.
Why it matters: Choosing storage by the shape of your data avoids forcing application records into a network cache. - Network caching use cases: Describe examples of network resources Cache Storage can keep available, such as an app shell, assets, an offline page, or URL-identified API responses.
Why it matters: These examples make the request–response storage model concrete. - Cached response updates: Explain why cached files need an explicit update strategy when their server versions change, and name an approach the section mentions.
Why it matters: Saving a response is not enough if clients may keep using an outdated copy.
Key terms: Cache Storage, Request, Response, IndexedDB, app shell, offline page, API responses, update strategy, versioned cache names, hashed filenames
12.4.7 File systems
Distinguishes user-owned files from origin-private storage and explains when and how browser apps can access each.
- User-owned document storage: Explain why a saved project, exported report, or text document calls for different storage from app-owned data, and describe how the File System Access API lets users choose files or directories and grant read or write permission.
Why it matters: The owner of the data helps determine which browser storage API is appropriate. - File picker invocation requirements: State when showSaveFilePicker() and showOpenFilePicker() may be called, and describe how to handle browsers that lack them.
Why it matters: These constraints keep file-picking features usable where supported and prevent failures where they are not. - Origin-private file distinction: Distinguish the Origin Private File System from user-selected files, including their visibility, need for document selection, and different quota treatment.
Why it matters: The distinction determines whether files are user-visible documents or private origin storage, and whether origin storage limits apply.
Key terms: File System Access API, user-document storage, permission, showSaveFilePicker(), showOpenFilePicker(), secure context, user gesture, SecurityError, progressive enhancement, Origin Private File System
12.4.8 Debugging and maintenance
This section shows how to inspect browser storage during development and maintain it responsibly in production.
- Storage debugging with DevTools: Explain why storage debugging should involve inspecting browser storage in DevTools rather than assuming a write succeeded or guessing what the app stored.
Why it matters: Inspecting what the browser actually holds helps you diagnose storage bugs instead of guessing. - Storage retention and recovery: Describe how to limit unnecessary stored data and give users a way to recover when storage is constrained or important content needs safeguarding.
Why it matters: The browser can hold data, but the app must prevent needless buildup and help users when storage fails or their content matters. - Stored data lifecycle planning: Explain why an app must validate restored data and plan for schema changes and server copies rather than relying on the browser to manage those concerns.
Why it matters: Saving data is only part of the job; the app must decide how that data stays safe and usable over time.
Key terms: DevTools, localStorage, IndexedDB, Cache Storage, origin storage usage, temporary data, quota errors, recovery path, export, user-generated content
12.5 Summary
Where this is used later
- Data validation (chapter 13) · Data received over HTTP
- EventTarget stores (chapter 13) · Reuses the AbortController cancellation primitive previously used with fetch().
- Design patterns (chapter 13) · stale requests and cancellation
- Reactive thinking (chapter 13) · Provides a concrete example of state that can drive UI rendering.
- Cache design patterns (chapter 14) · The earlier discussion of IndexedDB provides context for storing application data.
- Loading and persisting data (chapter 15) · IndexedDB as browser storage.
- Adding offline support (chapter 14) · Introduces Cache Storage as storage for network-shaped data.
Concepts explained in this chapter
- storage bucketAn experimental browser API proposal for grouping an origin's data under separate lifetime and eviction policies.
- storage apiThe Storage API is a browser API for inspecting web-storage usage, estimating quotas, and requesting persistence.
- Fetch APIA function of the Fetch API that initiates a network request and returns a promise for its response.
- web storage apiWeb Storage is a browser storage facility for small amounts of string key/value data associated with a web origin.
- Cache Storage APIThe Cache Storage API is a browser API for storing and retrieving request–response pairs, commonly to support offline use and control of network responses.
- IndexedDBIndexedDB is a browser database API for storing and querying structured data, including data larger than typical web-storage values.
- AbortControllerAbortController is a browser interface for signaling cancellation of asynchronous operations such as fetch requests and event listeners.
- promiseA JavaScript promise is an object representing the eventual completion or failure of an asynchronous operation and its resulting value.
- HTTPThe application-layer protocol used to transfer resources and messages between web clients and servers.
- stateData representing an application's current condition and behavior.
- vanilla webAn approach to building websites and web applications with core web technologies and browser APIs without a framework defining the application architecture.
- browser developer toolsBrowser developer tools are utilities for inspecting, debugging, testing, and profiling web pages and applications.
- CORSCross-origin resource sharing is a web mechanism through which servers use HTTP headers to specify which other origins may access their resources.
- AbortSignalA web-platform interface that communicates cancellation of an asynchronous operation.
- feature detectionFeature detection is a technique for determining at runtime whether a browser or environment supports a particular capability.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
