Isn’t using JQuery instead of Javascript just a complete waste of bandwidth?

Question by : Isn’t using JQuery instead of Javascript just a complete waste of bandwidth?
I only rely on about 10-20 self-written Javascript functions for any custom built site anyway (form validators, whitespace strippers, ajax xml loaders, etc.). Is it really worth using JQuery just to ensure compatibility with ALL modern browsers – even though I test on as many as possible anyway – given the additional bandwidth JQuery requires?
Visage – I don’t intend to write functions that are the equivalent of JQuery. I intend to write the same kind of Javascript I’ve been writing since 1996 (albeit with a huge break between 2002 and 2009 because I went into a different line of work), but wondering why I should port it to JQuery.

As an example, I have twenty javascript functions here that I wrote myself. Most are trivial (regexps dealing with whitespace, form validators, etc.), but there are others which process XML being returned from server side Python scripts that I also wrote.

The file size of the JS file is 8.67KB.

If I wrote equivalent code in JQuery, the code size would perhaps be a little smaller (probably about 6KB), but the (minified) JQuery.js script is 74KB. So you’re talking a bandwidth increase about 900% to perform exactly the same tasks.

Surely then, JQuery is only really worthwhile for extremely large websites?

Best answer:

Answer by Visage
Hardly. The production version of JQuery is very minimal, and even if you were to write your own functions that were the equivalent of JQuery, I seriously doubt you could do it in a less amount of kb and with the same degree of compatibility. Really, JQuery is quite minimal. I’ve never seen performance impacted too much by it to even really care.

Know better? Leave your own answer in the comments!

About Admin