Idea: Include web libraries right in your browser
Friday March 23rd, 2012
We all strive for speed. Neck-breaking edge-slicing so-fast-it-seems-instant speed. But we’re limited to the size of the webpages and scripts we download each time we visit a new site. Of course, there’s caching, content compression and asset minification but it’s only really effective for dynamic content that MUST be served from the website itself.
I do see a couple problems with this idea:
Problem 1: You need to keep the libraries updated. I doubt that it would be possible to integrate updates for the libraries into the core browser updates, meaning “Updating Chrome” wouldn’t necessarily update the library. This means it’s up to the user to update it manually, which in turn means it will only really be adopted with people familiar with non-novice browser use. One could always create a browser plugin to manage the libraries, but that’s a project in itself.
Problem 2: You need to change how browsers interpret an outgoing call to include the library (for backwards compatibility). For example, most people will use Google’s hosted version of jQuery on their sites. The browser would have to recognize that line of HTML and be smart enough to replace it with the local stored version of jQuery. I’m not sure this could be accomplished with an extension or not, but I assume it’s possible.
From what I understand, if you use Google’s AJAX Libraries CDN, you might not have to download jQuery for long periods of time due to some pretty awesome caching. But there are other libraries other than jQuery that would benefit from browser-side library inclusion. I think it would make large homebrew libraries and scripts a lot more attractive to a wider audience if they knew that users wouldn’t be bogged down by the extra requests (not to mention saving a bunch of bandwidth on the developers’ servers).
This is just an idea. It’s very likely someone on HN will tell me this is all already being done and I’d be more than happy to hear it.
Comments: Hacker News