For anyone who’s not familiar with JSFiddle.net, I highly recommend checking it out. It’s a great little online playground for testing out new ideas, providing examples of bugs, proof-of-concepts, etc.
For anyone already familiar with it, you may have used a common pattern where you linked to 3rd party JS libraries on Github like so:
When viewing any file on Github, there is a “Raw” button that will give you a direct link to the file. This is a handy way to reference JS files from services like JSFiddle.
Github discourages this, since they want repo owners to use Github Pages to host specific versions of their files. They discourage it by serving files from the “raw” domain with
Content-Type: text/plain instead of
Unfortunately, this broke a lot of JSFiddles, resulting in this error:
Refused to execute script from ‘https://raw.github.com/documentcloud/backbone/master/backbone.js’ because its MIME type (‘text/plain’) is not executable, and strict MIME type checking is enabled.
Luckily, someone came to the rescue and created a service that will proxy any file from raw.github.com and serve it with the correct MIME type.
All you have to do is remove the “dot” between “raw” and “github”, so that your request goes to
rawgithub.com instead of
So the above URL would instead be: