#13704 closed enhancement (invalid)
jQuery script size
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | JavaScript | Keywords: | |
Focuses: | Cc: |
Description
The size of the included jQuery script has ballooned up to 74KB in the latest 3.0 RC, nearly 3 times the size of the minified jQuery 1.4.2 script (24KB). This is adds a ton of unnecessary bloat / load time when the script is enqueued by theme or plugin authors. It appears Sizzle is included inside the jQuery script. In the spirit of keeping WP lightweight, fast, and modular, Sizzle should be extracted and jquery.js should include jQuery only.
Change History (11)
#2
in reply to:
↑ 1
@
15 years ago
Replying to nacin:
We've been including Sizzle since jQuery 1.3, which was WordPress 2.8.
Up until now the size of the script has been teetering on the edge of "OMG that's huge!". At 74KB in 3.0 it has officially entered that territory and now has the potential to really slow down WP for a lot of users.
Is there a specific reason why it can't be extracted? Maybe provide a jquery.lite.js or similar for devs that actually only want "jQuery" and nothing more?
#3
@
15 years ago
The official release of jQuery includes Sizzle bundled. I don't see much of an advantage to also bundle the light version.
#5
@
15 years ago
Unless I am confused, the official production (minified) release of jQuery does not include Sizzle and is 24KB:
http://jquery.com/
http://code.jquery.com/jquery-1.4.2.min.js
And no, I don't believe jQuery requires Sizzle.
#6
in reply to:
↑ 4
;
follow-up:
↓ 7
@
15 years ago
Replying to ocean90:
Ehm Sizzle is in jQuery and jQuery needs it, or I'm totally wrong?
No, I'm no wrong: http://docs.jquery.com/Release:jQuery_1.3#Sizzle_Selector_Engine
jestro: Read the description:
* Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses.
#7
in reply to:
↑ 6
@
15 years ago
ocean90: I am aware it includes Sizzle, that was the whole point of the ticket :)
#8
@
15 years ago
jestro:
You said:
The official production (minified) release of jQuery does not include Sizzle and is 24KB:
That's wrong, it includes Sizzle. Your linked version is the same as we use in core, I don't know, why they say 24KB.
#9
follow-up:
↓ 11
@
15 years ago
The difference would be gzip compression. If your server properly gzips assets, you'll be serving a file about 24KB.
#10
@
15 years ago
- Milestone Unassigned deleted
- Resolution set to invalid
- Status changed from new to closed
Best I can tell, Sizzle is standalone in that it does not require jQuery. The reverse is untrue; Sizzle is jQuery's selector dependency.
Closing as invalid.
#11
in reply to:
↑ 9
@
15 years ago
Replying to nacin:
The difference would be gzip compression. If your server properly gzips assets, you'll be serving a file about 24KB.
I stand corrected, thanks for the clarification. I did not notice the gzip compression. Sorry to muddle up the Trac with this :(
We've been including Sizzle since jQuery 1.3, which was WordPress 2.8.