PDA

View Full Version : 1 jQuery to rule them all ?


OldSchoolDSL
12-24-2011, 09:21 PM
In reviewing my page load, I noticed I have the same version of jQuery downloaded 5x or more. All for different modifications, but the same file.

Would it be "ok" to simply have this file download from the header and comment out all the other request for it? Or is there an un-known, yet logical and some what wasteful reason to have them all download?

kh99
12-25-2011, 11:44 AM
I don't think there's any reason that you couldn't change things to include the file only once. But I don't think you'd get a lot of improvement from it since I believe you'll find that the browser is only making a reuqest to find out if the file has changed and not to load the entire file again, so the response is very short.

OldSchoolDSL
12-27-2011, 04:34 AM
I don't think there's any reason that you couldn't change things to include the file only once. But I don't think you'd get a lot of improvement from it since I believe you'll find that the browser is only making a reuqest to find out if the file has changed and not to load the entire file again, so the response is very short.

You'll laugh when I tell you that I saved myself between 5 - 6 seconds commenting out all the jquery and adding only 1 in the header.

I found only 1 modification would not work like this (which was odd) and so that was un-installed (wasn't that important anyways).

kh99
12-27-2011, 07:21 AM
You'll laugh when I tell you that I saved myself between 5 - 6 seconds commenting out all the jquery and adding only 1 in the header.

I found only 1 modification would not work like this (which was odd) and so that was un-installed (wasn't that important anyways).


Oh...looks like I was wrong on both counts. :o Thanks for updating us.