Workers Sites: Extending the Workers platform with our own serverless building blocks
Sep 27, 2019Ashley Williams

Summary
Introduced Workers Sites, a feature that allows deploying entire static websites to Cloudflare Workers. This is achieved by simulating a filesystem on top of Workers KV, where file paths are keys and file content is values. Wrangler CLI handles the upload of assets to KV and the creation of an asset manifest. The Worker script then uses this manifest to look up asset content hashes and fetch assets from KV. For performance, assets are cached on the edge after the first read per location, with cache busting handled by content hashes. This enables long-term caching of static assets, including HTML, reducing KV reads and improving performance.