After playing around with ExtJs over the last few weeks, I had a thought:
- Frameworks like Prototype, JQuery, ExtJs, etc. are big downloads, yet many sites use them.
- Google has server space and bandwidth to spare.
- Google has a strong interest in supporting web-based applications.
Users would see three immediate benefits:
- Google’s bandwidth when downloading these common framework files.
- Downloading from Google’s domain means their browser will open a new HTTP connection (faster)
- The user’s browser cache would already have these popular files when they visit future sites that use them.
On Google’s side, it’s dirt-simple: static files, one folder for each version. So, a web designer wishing to use the current version of Prototype would simply add a link to “http://static.google.com/prototype/188.8.131.52/prototype.js”. If Google wanted to get fancy and allow for more HTTP connections, they could add more domains, such as “prototype.static.google.com.”
Because versioning is done in the URI, Google could set the expiration headers so the user’s browser would keep the file cached forever, diminishing the bandwidth cost even further.
I’ll even recommend some starter content:
- Ext JS
- “Silk” icons (http://www.famfamfam.com/lab/icons/silk/)
I don’t recommend that Google open this up to just anyone to post random files for hosting–we know where that will lead. But these packages (and a few others I can’t think of right now) have a large fan base and are incredible tools for creating web applications, and only a company like Google could pull this off.
I’m trying to remember if any XSS limitations would be an issue, but if so, a web designer could fix that with a simple CNAME.
Update: I’m not the first to think this, apparently. Dean Edwards played around with making code.google.com serve up some static content, and the comments there confirm that others think this would be a great idea. So what about it, Google? Can you spare some change?
Update 2: Someone is using Google Code to try to do this. We’ll see how long it takes for Google to either shut it down or sign on. I disagree with their philosophy of only distinguishing major and first-level minor releases. Even small releases can introduce issues, and it should be up to the site designer to flip the switch or to even use beta versions along the way.