homepage Welcome to WebmasterWorld Guest from 54.242.18.190
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Which CDN do you use?
CDN = Content Distribution Nextwork
incrediBILL




msg:4682546
 2:27 am on Jun 25, 2014 (gmt 0)

For those that have been hiding under a rock, we don't always need to download and host files like jQuery, Bootstrap, etc., we can directly link to them from our HTML to CDN's that host them instead of downloading them locally.

The upside to using the CDN:

1) browsers have limits to how many files it can load concurrently from a single domain which is why the CDN frees up more sockets for your domain and also the odds are the common CDN sources are already cached meaning your client ISN'T downloading the content from scratch very often. Other sites easily resolve this problem by making subdomains for downloading page resources such as www1.example.com, www2.example.com, etc. and let the load balancers sort it out thus speeding up the page display.

2) It's an easy way to make sure you always have the most current and updated code without downloading it to all your sites. Just as a security/update method putting all those files on a common subdomain such as "resources.example.com" wouldn't be such a bad idea instead of installing them per site.

3) Makes using developer prototyping tools like jsFiddle easy as heck, but then again we all knew that. I'm all for using 3rd party CDN to fiddle around.

Here's a few CDN's to try:

If you're not aware it exists:
http://www.jsdelivr.com/

Then there's this thing...
http://code.createjs.com/ from http://createjs.com

Of course the usual suspects we already know...
http://cdnjs.com/ from https://github.com/cdnjs/cdnjs
http://www.asp.net/ajaxlibrary/cdn.ashx
https://developers.google.com/speed/libraries/devguide?csw=1

Also:
http://www.bootstrapcdn.com/


Enjoy.

 

Readie




msg:4685619
 12:17 pm on Jul 7, 2014 (gmt 0)

One thing I've noticed about sites using CDNs is they can often be the "holding back the page load" factor - presumably when the CDN finds itself under a particularly heavy load. Amazonaws is the one I notice more than others (comments won't load on a blog I frequent until something from amazonaws downloads).

You also open yourself to XSS attacks, based on the respectability and security practices of the CDN you use. If the code on the end is outside of your control, it can be changed to something you don't want it changed to. It may be picked up pretty quickly, but the damage may already be done by then.

Local CDNs however, which you outline in your second point, are in my opinion an excellent idea, and something I already use regularly.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved