Deliver GitHub files at
edge speed
Eclipse CDN turns any GitHub repository into an instant, globally distributed asset network. No config. No cost.
Everything you need,
nothing you don't.
Eclipse CDN is purpose-built for GitHub assets — fast, simple, and entirely free.
GitHub-native
Point it at any public GitHub repo. Use a tag, commit hash, branch, or @latest for auto-resolution. It just works.
Service Worker Powered
Runs entirely in the browser via a service worker. No backend, no server required — assets are intercepted and delivered instantly at the client level.
CORS Everywhere
Every response includes permissive CORS headers, so you can load assets directly from the browser without any server-side proxying.
Smart MIME Types
Automatic content-type detection for JS, CSS, fonts, images, WASM, JSON, and more — no manual configuration needed.
Immutable Caching
Versioned URLs are cached with immutable directives. Branches get smart stale-while-revalidate headers.
Zero Backend
Entirely static — just drop sw.js and register.js onto any static host and you're live. No servers, no workers, no infrastructure.
How to use Eclipse CDN
Everything you need to get assets loading at global edge speed.
URL Format
All Eclipse CDN URLs follow a consistent pattern. Currently, only GitHub repositories are supported.
https://cdn.eclipsesuite.org/gh/:user/:repo@:version/:file
| Segment | Description | Example |
|---|---|---|
| /gh/ | GitHub provider prefix (required) | /gh/ |
| :user | GitHub username or org name | jquery |
| :repo | Repository name | jquery |
| @:version | Tag, branch, commit SHA, or @latest | @3.7.1 |
| :file | File path within the repo | dist/jquery.min.js |
Note: Only public GitHub repositories are supported.
Versioning
Eclipse CDN supports multiple ways to reference a specific version of a file from GitHub.
/gh/user/repo@3.7.1/dist/file.min.js
/gh/user/repo@latest/dist/file.min.js
/gh/user/repo@main/src/index.js
/gh/user/repo@a1b2c3d/dist/file.js
Production tip: Always pin to a specific tag or commit SHA in production. Using @main or @latest means the cached file can change on the next cache bust. Tags and commit SHAs are served with immutable cache headers.
Examples
Drop-in examples for common use cases — load anything from any public GitHub repo.
<script src="https://cdn.eclipsesuite.org/gh/jquery/jquery@3.7.1/dist/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdn.eclipsesuite.org/gh/twbs/bootstrap@5.3.3/dist/css/bootstrap.min.css">
const mod = await import(
"https://cdn.eclipsesuite.org/gh/user/repo@1.0.0/src/module.js"
);
@import url("https://cdn.eclipsesuite.org/gh/user/repo@main/styles/theme.css");
const res = await fetch(
"https://cdn.eclipsesuite.org/gh/user/repo@latest/data/config.json"
);
const config = await res.json();
Response Headers
Every Eclipse CDN response includes these headers for debugging and integration.
- X-Eclipse-CDNAlways
1. Confirms the response passed through Eclipse CDN. - X-Eclipse-SourceThe resolved path in
gh/user/repo@ref/fileformat. - Cache-Control
immutablefor tags/commits; stale-while-revalidate for branches. - Content-TypeAutomatically detected from file extension.
- Access-Control-Allow-Origin
*— CORS open for all origins. - Timing-Allow-Origin
*— allows Resource Timing API access.
Caching Strategy
Eclipse CDN uses the browser's Cache API (via the service worker) to store fetched files locally, so repeat requests are served instantly without hitting GitHub again.
| Ref Type | Cache-Control | Cached Locally |
|---|---|---|
| Tag / Release (e.g. @1.0.0) | public, immutable | Yes — indefinitely |
| Commit SHA | public, immutable | Yes — indefinitely |
| @latest | public, stale-while-revalidate | No — always re-fetched |
| Branch (main, master, etc.) | public, stale-while-revalidate | No — always re-fetched |
Immutable refs (tags and commit SHAs) are stored in the browser Cache API and served instantly on repeat visits. Branches and @latest always fetch fresh from GitHub.
Error Responses
When something goes wrong, Eclipse CDN returns a JSON error body with a descriptive message.
{
"error": "File not found on GitHub",
"status": 404,
"details": {
"user": "jquery",
"repo": "jquery",
"ref": "9.9.9",
"file": "dist/jquery.min.js"
}
}
| Status | Meaning |
|---|---|
| 400 | Invalid URL format — check the path structure |
| 403 | GitHub rate limit hit or repo is private |
| 404 | File, repo, or ref does not exist on GitHub |
| 405 | Only GET and HEAD are supported |
Self-Hosting
Eclipse CDN is entirely static — no backend required. Just drop three files onto any static host (GitHub Pages, Netlify, Vercel, etc.).
index.html — the website
sw.js — the service worker (must be at root)
register.js — registers the service worker
git init
git add index.html sw.js register.js
git commit -m "deploy eclipse cdn"
git push origin main
Important: sw.js must be served from the root of your domain so its scope covers all /gh/ paths. If it's in a subdirectory, the service worker won't intercept CDN requests.
Start delivering at the edge
Join the Eclipse community or deploy your own instance in minutes — completely free.