JavaScript network requests
JavaScript Fetch API, HTTP requests, and real-time browser data
Learn JavaScript network requests with focused lessons on the Fetch API, HTTP responses, JSON, FormData, download progress, aborting requests, cross-origin requests, URL objects, XMLHttpRequest, resumable uploads, long polling, WebSocket, and Server-Sent Events.
Network request lessons and concepts
Fetch API basics
Send browser HTTP requests, read responses, handle request options, and connect network code to promises.
Outcome: Use Fetch API calls for common browser request and response workflows.
- JavaScript fetch
- Fetch API
- HTTP request JavaScript
FormData uploads
Build form payloads and upload data with browser APIs that work naturally with JavaScript requests.
Outcome: Send form fields and files with predictable request payloads.
- FormData JavaScript
- file upload JavaScript
- multipart form data
Download progress
Track streamed response bodies and show download progress for long-running browser requests.
Outcome: Measure network progress without blocking the page.
- fetch progress
- download progress JavaScript
- ReadableStream
Abort requests
Cancel in-flight browser requests with AbortController when the user navigates or changes intent.
Outcome: Stop stale network work and keep asynchronous UI behavior clean.
- AbortController
- abort fetch
- cancel request JavaScript
Cross-origin requests
Understand CORS, cross-origin request rules, and what headers allow a browser request to complete.
Outcome: Debug browser network errors caused by origin and header policy.
- CORS JavaScript
- cross-origin requests
- fetch cors
Fetch API details
Study Request, Response, headers, body handling, and deeper Fetch API behavior for production code.
Outcome: Use lower-level request and response primitives deliberately.
- Fetch API JavaScript
- Request Response
- HTTP headers JavaScript
URL objects
Build, parse, and update URLs safely before using them in JavaScript network requests.
Outcome: Construct request URLs without fragile string concatenation.
- URL object JavaScript
- URLSearchParams
- query parameters
Real-time browser communication
Compare long polling, WebSocket, and Server-Sent Events for real-time browser updates.
Outcome: Choose the right browser communication pattern for live data.
- WebSocket JavaScript
- Server-Sent Events
- long polling