Friday, July 20, 2012

AngularJS Now Hosted on Google CDN

As you probably already noticed, one of the core AngularJS values is simplicity. Simple is awesome, but simple and fast is doubly awesome and that's why we also value speed and performance.

Since early beginnings of the project, we strived to make bootstrapping of AngularJS apps as fast as possible and offered to host all of the AngularJS artifacts on our http://code.angularjs.org/ server which follows the best caching and compression practices. Our expertise and server is however no match to the speedy autobahn-like Google CDN (content delivery network).

Thanks to your adoption of AngularJS all over the world, we earned the privilege to be hosted on this state of the art infrastructure. And so I'm happy to share with you, that as of today you can start relying on Google CDN when deploying AngularJS apps.

In order for everyone to truly benefit from this, we need your help. While the CDN definitely speeds up the first download of angular.min.js file (you do use the minified file in production, right?!?). The biggest benefit the CDN will give us is providing the canonical URLs for all common AngularJS files, which are then served with far-future expiration headers and cached in browsers all over the world.

What this means is that if some app (for instance "Spiderman's Todo List") pulls angular.min.js version 1.0.1 from the Google CDN and another app (let's say "Batman's Recipe Book") by an unrelated developer pulls the file from the same url, both of these files will share this file once cached. So if a user uses both of these awesome apps, she will have to download the angular.min.js file only once.

Call to Action

If you run an AngularJS app in production, please instead of hosting the Angular files yourself, change your html file or script loader to use Google CDN urls.

We already approached Plunker and JsFiddle to do the same for their snippet templates. And will work with various teams at Google to use the Google CDN in their apps as well. And of course we are going to switch all *.angularjs.org apps to use the CDN as well.

Google CDN Info

The latest version (v1.0.1) of AngularJS is currently already deployed on the CDN and we'll be adding newer versions as we release them.