Requests to a project with static assets can either return static assets or invoke the Worker script, depending on if the request matches a static asset or not.
- Requests to static assets are free and unlimited. Requests to the Worker script (for example, in the case of SSR content) are billed according to Workers pricing. Refer to pricing for an example.
- There is no additional cost for storing Assets.
- Important note for free tier users: When using
run_worker_first, requests matching the specified patterns will always invoke your Worker script. If you exceed your free tier request limits, these requests will receive a 429 (Too Many Requests) response instead of falling back to static asset serving. Negative patterns (patterns beginning with!/) will continue to serve assets correctly, as requests are directed to assets, without invoking your Worker script.
See the Platform Limits
When a request for a static asset includes a Range header, Workers returns 200 OK with the full file instead of 206 Partial Content, and the response has no Content-Range or Accept-Ranges header. Some clients need range support, for example Safari when it plays video.
To serve byte ranges, route the affected paths to your Worker with run_worker_first. In your Worker, fetch the file with env.ASSETS.fetch(), then return a 206 Partial Content response that contains the requested bytes and a Content-Range header.
assets.bucket is a required field— if you see this error, you need to update Wrangler to at least3.78.10or later.bucketis not a required field.