Advertisement

11.25.2007 at 11:07AM PST, ID: 22981162
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2

Using JQuery in Production Environment on Windows.  Best to Gzip, Pack, Minify or leave uncompressed?

Asked by thyros in JavaScript, Hypertext Markup Language (HTML), Extensible HTML (XHTML)

Tags: , ,

I am hosting a website on a Windows server, and I would like to use the JQuery library for some general functionality and effects.  However, the uncompressed version of the file is approx 77kb, which seems a bit much, or is that acceptable?

There are a number of versions available from the site http://jquery.com/

Minified - http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.1.min.js  45.3 KB

Packed - http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.1.pack.js 26.5KB

Uncompressed - http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.1.js 78.6 KB

However, from the homepage itself it mentions a version being minified and gzipped as being 14KB, but there's no download link there, only to the minified version which has a 45Kb filesize.

I don't have any experience or knowledge about the differences between gzip, packed, minified etc.  What is the best method for including the JQuery library into the site?  I was under the impression that gzip was for Unix servers only, is that correct?  I have a separate Unix box which I could host the file on, but how would I reference it in the header, and would there be any problems with ssl and differing domain names.  i.e. assuming the main site is called www.windows.com and the file is hosted at https://unix.windows.com/jquery.js  ?

My initial thought is to go with the packed version at 26kb, but someone advised against it on one of the blogs related to the jquery site.  Here is what they said:

"using Packer™s redundancy reduction algorithm adds a delay at the time the script gets executed (because the script needs to be unpacked and then evaled) On my laptop, this delay is about 200 msec. The conclusion is clear: for optimal performance, gzip your JavaScript code, and stay away from advanced JavaScript compression schemes that look attractive on paper, but end up degrading the performance of your site."

And another comment:

"GZip is absolutely the correct way to compress javascript.

No eval-based compression scheme should be used because it simply takes too long to decompress the javascript file in the browser.

Don™t believe me? Consider the savings. If you save 40 kB by compression from 60 kB to 20 kB, it only takes 40 ms longer to download the full file the first time using a 8M ADSL connection.

Afterwards, you pay for the compression every time when the page is being reloaded. If it only takes 10 ms to decompress (and my measurements indicate that for my hardware it™s more like 20 ms), then after 8 page refreshes the advantage is gone.

So say yes to minimification schemes that make it possible to cache and reuse the javascript file without a decompression step.

Size isn™t everything."

http://www.julienlecomte.net/blog/2007/08/13/

Based on such information, what would be your advise, go ahead with the packed version at 26kb and disregard the execution time each time a page loads, or simply use the uncompressed version at over 77kb?  The site I am working on is targeted at the UK audience, and from what I understand, most people are on atleast 2mb broadband here.
Start Free Trial
 
Loading Advertisement...
 
[+][-]11.25.2007 at 03:11PM PST, ID: 20347341

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.25.2007 at 04:53PM PST, ID: 20347692

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.29.2007 at 03:45AM PST, ID: 20372760

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.29.2007 at 02:41PM PST, ID: 20378061

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.03.2008 at 03:21PM PST, ID: 20810904

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.03.2008 at 09:38PM PST, ID: 20812185

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript, Hypertext Markup Language (HTML), Extensible HTML (XHTML)
Tags: jquery, gzip, minified
Sign Up Now!
Solution Provided By: Zvonko
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02.24.2008 at 01:55AM PST, ID: 20969371

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]02.24.2008 at 03:36PM PST, ID: 20971967

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628