static asset
A file served exactly as stored, such as an image, stylesheet, font or script bundle, rather than generated for each request.
In more detail
Static assets are ideal for caching. When their file names include a content hash they never change, so they can be cached forever.
Related terms
- hashed file name — A file name that includes a hash of the file's contents, such as app.3f9a1c.js, so any change produces a new name.
- cache-first strategy — A caching strategy that answers from the cache when possible and only goes to the network, then caches the result, on a miss.
- bundle — The files a build tool produces by combining an application's code and its libraries for the browser to download.
- Brotli — A compression format designed by Google that usually shrinks text more than gzip, at the cost of slower compression at high quality settings.
- compression — Encoding data in fewer bytes by removing repetition, so it takes less space and less time to send.
Taught in
- Service Worker Lifecycle: Installation, Activation And Update — Frontend Architecture & Web Platform
- Cache Storage API: Offline Strategies And Cache-First Patterns — Frontend Architecture & Web Platform
- The Fetch API: Streaming Responses, HTTP Caching And Keepalive — Frontend Architecture & Web Platform
- Native Compression: node:zlib & Streaming Codecs — Node.js Internals & Backend Services
- Native HTTP/2 Protocols: Multiplexed Streams & Push — Node.js Internals & Backend Services