What are Static Assets?
Static assets are files delivered without being generated anew for each request, including images, fonts, stylesheets, scripts, and videos. Their contents change only when the stored files are replaced or rebuilt.
How Static Assets work
These deployable files are produced ahead of a request and served directly from an origin, object store, or CDN. A build system may optimize, bundle, or fingerprint them even though the delivery tier does not render them per visitor. Content-addressed or revisioned names allow immutable caching, while an HTML document or manifest points to the current versions. In media sites, the group can include interface imagery and fonts as well as preview clips, posters, and downloadable resources.
Key facts
- A filename containing a content hash makes cache invalidation explicit: changed bytes produce a new URL, while unchanged assets remain reusable across deployments and pages.
- Correct MIME types still matter for static delivery, but enforcement varies by resource type: browsers refuse ES module scripts served without a JavaScript MIME type, nosniff adds blocking for mismatched scripts and stylesheets, and font and media loads generally are not held to a matching Content-Type, although cross-origin response blocking in some browsers can reject certain responses by type.
- Cross-origin font, canvas, and media use can require suitable CORS headers; placing an asset on a CDN does not automatically make it readable by browser APIs on another origin.
When Static Assets matter
Fingerprint assets when releases may change their contents, allowing long-lived browser and CDN caching. Without versioned URLs, stale cached files can conflict with newly deployed code.