No Go: Chrome 27 and Hotlinking Files from GitHub

April 28, 2013

Heads up! This blog post hasn't been updated in over 2 years. CodePen is an ever changing place, so if this post references features, you're probably better off checking the docs. Get in touch with support if you have further questions.

As of this writing, Google Chrome is version 26. The "stable" widely released version, that is. The beta version is version 27, released on April 4, 2013. Chrome 27 will no longer run JavaScript files that have the wrong MIME type. As in, they need to be served as text/javascript. GitHub serves files as text/plain when you link to their "raw" versions, like this. GitHub does this on purpose as to not encourage hotlinking of those files, which is a bad idea in general anyhow.

On a site like CodePen, which is great for little demos and tests that aren't usually mission-critical, it is often useful to hotlink styles and scripts like that. So this is just a heads up that that won't work anymore in Chrome soon. Chrome is on a six week cycle, so this change will go out to stable Chrome around May 16, 2013. You could always test in another browser, or probably better, move that script somewhere else to link to. You can host the file right here on CodePen if you're PRO.