CDN for your source code A decade proven way to serve files from source code hostings with proper Content-Type headers
Use this URL in production
Use a specific tag or commit hash in the URL (not a branch)
Files are cached permanently based on the URL, query string is ignored
To force-invalidate,
Use this URL for development
New changes you push will be reflected within minutes
FAQ
Who runs this? How can I get in touch or support the project?
Hi, I'm Pavel Puchkin.
For outages, abuse, or general feedback — send me an email. For bugs, please file an issue on GitHub.
If you'd like to support the service, visit my Ko-fi page.
Why is this necessary? Can't I just load files from my favorite service directly?
When you request a file from source control hosting services, they are usually served (in the case of JavaScript, HTML, CSS, and some other file types) with a Content-Type of text/plain. As a result, most modern browsers won't actually interpret it as JavaScript, HTML, or CSS. Hosts do this to discourage using repos for static file hosting, since serving raw files is relatively inefficient.
rawgit.hack acts as a caching proxy: it forwards requests to the corresponding service, relays responses to your browser with the correct Content-Type headers, and caches them — briefly for development URLs, permanently for CDN URLs. The result is quick and easy static file hosting right from a repo.
How does rawgit.hack handle HTML files?
rawgit.hack serves HTML as-is, without any filtering. This has been abused to host phishing pages, which causes the service to get flagged by browsers and antivirus software.
To mitigate this, rawgit.hack shows a brief confirmation page before opening any HTML file — it displays the destination URL and asks you to confirm. After confirming, the notice won't appear again for any page in the same repository for 24 hours.
Non-HTML files are not affected. Neither are non-browser clients (curl, wget, etc.). For browser automation tools, set the cookie __Http-phish=1 on the target domain to skip the confirmation.
What source code services are supported?
What's the difference between development and CDN URLs?
Development URLs are proxied on every request and cached for a short time — changes in your repo show up within minutes. Use them for low-traffic testing and demos only; don't use them in production.
CDN URLs are routed through CloudFlare and cached for a year, giving the best performance and reducing load on rawgit.hack. The downside is that the file won't update on reload.
To serve a new version, use a tag or commit ref in the URL instead of a branch name — e.g. /user/repo/TAG/file instead of /user/repo/BRANCH/file. If you need to invalidate a URL immediately, use the purge cache button above, or send a DELETE request from the command line:
curl -X DELETE 'https://raw.githack.com/purge?url=https://...'
Is rawgit.hack related to RawGit?
RawGit was a similar, now defunct service that inspired rawgit.hack. The main difference is in implementation: instead of a Node.js application, rawgit.hack is built entirely on nginx — which makes it simpler, faster, and easier to maintain.
I need guaranteed 100% uptime. Should I use rawgit.hack?
Probably not. rawgit.hack is a free service and cannot provide any uptime or support guarantees, even for CDN URLs. Network issues, abusive traffic, and the occasional self-inflicted outage are all real possibilities.
That said, the service has been running since 2013 — over a decade — without major outages. You can check the uptime stats and decide for yourself.