The marvel of externally-hosted javascript and CSS

Before:

~/content/stylesheets/reset.css
~/content/stylesheets/site.css
~/content/scripts/jquery.min.js
~/content/scripts/jquery-ui-1.7.1.custom.min.js
~/content/stylesheets/smoothness/jquery-ui-1.7.1.custom.css
~/content/scripts/site.js

After:

http://yui.yahooapis.com/2.7.0/build/reset/reset-min.css
~/content/stylesheets/site.css
http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js
http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js
http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/smoothness/jquery-ui.css
~/content/scripts/site.js

My app is now using Google and Yahoo’s content delivery networks (CDNs) to host most of its javascript and CSS files. This will improve client load times, and browsers can cache and share between all other sites that use them. Much better I think!

Links:

One thought on “The marvel of externally-hosted javascript and CSS

Comments are closed.