Our great sponsors
-
sveltekit-isr-cloudflare-workers
Incremental static regeneration for SvelteKit on Cloudflare Workers
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Please do not use this code for production. Serving static assets is a bit more complicated than this, as you have to carefully set response headers to obtain the best possible caching behaviour on browsers. To serve static assets properly i suggest using this library https://github.com/cloudflare/kv-asset-handler
It is made with Svelte Kit, you can find the source code here. Every page has a top red bar ( or bottom if you are reading from a smartphone) that shows when the page was rendered and for how long it is stored.