162

Is there any CDN sources for backbone.js and also underscore.js to use in our projects?

ward87
  • 3,026
  • 7
  • 27
  • 27

2 Answers2

250

http://www.cdnjs.com hosts a lot of less popular JavaScript frameworks, including:

For convenience, here are the script tags:

Backbone.js
<script type="text/javascript"
   src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"></script>
Underscore.js
<script
   src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
jpaugh
  • 6,634
  • 4
  • 38
  • 90
Tomasz Nurkiewicz
  • 334,321
  • 69
  • 703
  • 674
14

http://www.jsdelivr.com/ is also a good alternative for less popular frameworks

  • : //cdn.jsdelivr.net/backbonejs/0.9.10/backbone-min.js
  • : //cdn.jsdelivr.net/underscorejs/1.4.3/underscore-min.js

Also in most cases it is a good idea to omit the protocol in the URL for JavaScript source.

More on http://www.paulirish.com/2010/the-protocol-relative-url/

Mite Mitreski
  • 3,596
  • 3
  • 29
  • 39
  • Why omit the protocol again? – Brian Peterson Dec 06 '13 at 00:54
  • 2
    @Bepetersn it will work on HTTP and HTTPS site. Basically the newer browser will not include non HTTPS content on an HTTPS page, this simplifies the job, but does not work on IE6 I think – Mite Mitreski Dec 06 '13 at 01:19
  • NB: though according to best practices the protocol should be omitted, this can cause issues (not just browser support); e.g. https://twitter.com/mindmillmedia/status/402550801328922625. – JohnLBevan Dec 20 '13 at 00:04
  • 2
    jsdelivr is the worst cdn ever, do not use in production, you have been warned – Pykler Mar 02 '14 at 19:59
  • 3
    @Pykler Can you tell me why? In asia/pacific, jsDeliver is the fastest public cdn. – ceram1 Apr 14 '14 at 02:38