Is jQuery size harmful?

Before starting to learn how to use the jQuery library, I want to assure myself of something that concerns me with regard to file size ...

I am well aware that file cache files and servers, such as jQuery, - theoretically, that the file should be downloaded only once, and therefore the speed of subsequent use increases.

My questions are about how browsers process javascript files and is there any harmful effect when working with a 32k file file that is processed by the browser every time the page loads? This is not only the size of the file, but its complexity at the same time.

Or is my understanding wrong, and that browsers not only cache the javascript file, but also some kind of “compiled” version of this file? (Yes, I know that javascript is not really “compiled”, but hopefully you know what I mean.)

I assume that most browsers have the ability to process the file fast enough to make the difference differently, and that the speed advantage when processing less code written to use jQuery compensates for this.

+5
source share
2 answers

Your problems with asset size and js engine performance have several overlapping factors that you need to consider. In the end, only you can determine what is suitable / acceptable for your project.

The size

, , .

, , , - . , js. , . , , . , , .

, jQuery .

jQuery?

" jQuery", , - js. , , , , .

jQuery , .

jQuery - , js. .

, jQuery . , , jQuery , , . jQuery , , - . .

, jQuery . , ? DOM , , Sizzle, 4 (minified gzipped).

, jQuery - , . , ? , . , 40 , ?

. , .

/

js-. js , - , , , .

, js ( , , jQuery) . js-, V8 Chrome, js, JScript IE7 .

jQuery - , , , js, . , , jQuery, , , .

, jQuery DOM API. , . , ( ), , . , , , jQuery, , . , .

jQuery

, , js , , jQuery . , / . , ( ), , . , .

, !

+3

All Articles