Why is there no jQuery browser plug-in.

Over the last months I have worked a lot with HTML5 and CSS 3 – especially animations – and came to the conclusion that for a lot of things Flash is not needed anymore. Instead I have used jQuery more and more since it has lots of functions already built in and let you create dynamic websites easier than ever.

On January 31st the latest version of jQuery 1.5 is expected to be released. With that a lot of new bug fixes, features and changes will be introduced. That is, many developers will then check their code and improve one or another thing. But unlike Flash or other frameworks, most developers will just stay using the jQuery version they have been used unless they really need to change something. With jQuery that’s possible since the jQuery version is selected by the developer and not the user. In case of other frameworks users will perform the update and thus some web pages will have to change in order to be displayed or work correctly. Thus the developer has more control.

However, I’ve also digged into web page performance for some sites and still think about one line of code. Over and over again I’m importing a jQuery javascript file at the end of the homepage – thus loading roughly 79 KB (gzipped is aroung 25KB). Since I’m using Google’s CDN a visitor who has previously been to another website using the same version has already downloaded it already and thus eliminating the delay. But not everybody does that.

So, why don’t we just pave the cowpaths as suggested by the HTML 5 design principles and create a “jQuery framework” that’s downloaded once and available always in the browser. Sure, you have versioning issues, but since the file is so small you could have 5-6 versions installed. The advantage of this could be that the jQuery code is saved in a complied version and thus load even faster. If the version you need is not yet available on the system it would be downloaded instead and availible for all other websites later.

Are there any other drawbacks to this?

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *