Coast serves the JavaScript, stylesheets, fonts and WebAssembly your pages depend on — from immutable, versioned URLs, cached at 18 points of presence along the world’s coastlines.
The idea
Most of the web is built from files someone else published. A date picker here, a font there, a charting library pulled in at the last minute. Each of those is a promise: the bytes at this address will be the bytes you tested. Too often that promise is quietly broken by a mutable tag, a purged cache or an origin that went away.
Coast takes the promise literally. Every release lives under its own path of the form /v/<package>/<version>/<file>, and once a version is published its contents are frozen. We hand out the integrity hash with it, ask browsers to cache it for a year, and let our edges keep it for as long as anyone is still asking.
The result is a delivery layer that is dull in the best sense of the word. No purge button, no build plugin, no account to create. You link a file, the first visitor warms the nearest edge, and everyone after them gets the same bytes from a few milliseconds away.
Principles
A published version can never be overwritten. Links in a five-year-old blog post still resolve to exactly the file the author linked, and the response headers say so: Cache-Control: public, max-age=31536000, immutable.
Each file ships with a published sha384 digest. Paste it into a Subresource Integrity attribute and the browser will refuse anything that does not match, whatever happens between our edge and your visitor.
New releases are mirrored from the registry within minutes, and popular versions are pre-positioned along the coast. The first request in Lisbon should not be slower than the thousandth.
HTTP/2 and HTTP/3, Brotli and gzip, TLS 1.3 with automatic certificate rotation, and an anycast front door that steers each request to the closest healthy PoP.
By the numbers
“We replaced three self-hosted mirrors with one line of HTML. Nothing has moved since.”— Maintainer of an open-source dashboard toolkit
In practice
An ES module import, straight from the nearest shore:
<script type="module"> import { mount } from "https://cdncoast.com/v/sundial/2.8.1/sundial.min.js"; mount("#app"); </script>