Observation on CDN


Leveraging CDN (Content Delivery Network) to speed up static files loading time is one of the most important fact which affects a website's loading time, CDN was emphasized in many articles related with improving website's performance, for example:

Free JavaScript CDN providers

Majority of the largest websites (Facebook, Twitter, Yahoo, Google, etc.) on the planet have their own CDN solution, while for a small website or a web application used by a small number of people, it is not very possible to setup your own CDN, luckily there are free CDN services who can provide famous javaScript/CSS library mirrors all around the world, below are free ones I've used:

Which one I should use?

First of all, Selecting the Right CDN for YOUR Website! Features like 100% up time, reverse proxy ability, public cache header and gzip text content and very important, but anyway speed is one of the most important "feature", generally speaking, different CDN providers might behave different performance in different area, The best CDN for jQuery in 2012 is research comparing speed between Google, Microsoft and Media Template (jQuery official CDN). Personally I'd prefer jQuery's official CDN if I use jQuery (when I don't use?), and CDNJS for less-famous JS libraries.

Best practices

IMHO, the following one are the most important points to serve static files efficiently:

All of above are mentioned in Yahoo's Best Practices for Speeding Up Your Web Site, and google also has a great article talking about best practice of HTTP caching.




Leave a comment