4 ms·
Perfect! Considering loading scripts from CDN: I just like to keep as much as possible locally and minimizing having to rely on things I have no control over (
by kekebo 12y ago
Perfect!
Considering loading scripts from CDN: I just like to keep as much as possible locally and minimizing having to rely on things I have no control over (I've noticed Google Fonts taking up to almost a second in a few rare cases).
As for why I'm (still) using prototype: I'm taking over a (mediocrely designed) magento shop, which has prototype as a standard dependency (apparently for ECMA5 support).
- smt88 12y agoWhen you use a CDN, you can use a local fallback. Note that very old/shitty browsers won't support scheme-less URLs or jQuery 2.x, although those options are more modern and preferable. You just have to make the decision based on your users. Here's example code for local jQuery fallback: <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="js/jquery-2.1.3.min.js">\x3C/script>')</script> You can also use yepnope, but I don't use that personally.