4 ms·
Html5shiv and Serving Content From Code Repositories
- rickette 14y agoYou wouldn't believe how many times I've seen people serve 3rd party resources from source code repositories or other non-CDN locations. Take for instance Twitter Bootstrap. Many people used to include "http://github.com/twitter/bootstrap/blob/master/bootstrap.css http://github.com/twitter/bootstrap/blob/master/bootstrap.cs.... Hell, the old Bootstrap site even suggested this approach by making it easy to copy/paste this url into your site. Luckily Bootstrap 2.0 improved on this by requiring a zip download.
- jqueryin 14y agoI serve content from my own repository for my Turntable.FM chrome extension. Since the bulk of the code is JS, I just dynamically load the file from the github repo. What's great about this method is the ability to update most parts of the plugin without needing to repackage the extension and upload back to the store. I work off separate branches for my local testing and updates and then merge into master when it's ready for showtime.
- redslazer 14y agoSo your users have to keep downloading the file? Isnt that sort of inefficient considering the point of a plugin which is meant to be stored locally?
- r4vik 14y agoControversial but I'm going to say it anyway, if my site looks messed up in IE I feel bad for you son so I copy&pasted html5shiv. I've never tested it in IE, if it works for you then cool. If it doesn't or is slow. Well install another browser, I tried.
- TazeTSchnitzel 14y agoWhat we need is GitHub CDN, or something like that. An open CDN for JS.
- redslazer 14y agoCloudflare has an open CDN at http://www.cdnjs.com/ http://www.cdnjs.com/ that hosts a ton of popular and not so popular js libraries. The link for html5shiv is http://cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.js http://cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.js
- TazeTSchnitzel 14y agoAh, that's exactly what I meant! :)
- minikomi 14y agoLet's not forget the infamous Crockford alert.. http://www.stevesouders.com/blog/2009/12/10/crockford-alert/ http://www.stevesouders.com/blog/2009/12/10/crockford-alert/