[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Minified javascript files



 ❦ 20 août 2012 09:31 CEST, Thomas Goirand <zigo@debian.org> :

>> I believe differences like that are not important, compare how gcc
>> generate different binaries each time depending on parameters etc.
>> However, if a minified file is shipped that cannot be re-created at all
>
>> (due to no minifier) I don't think shipping source for the file is the
>> only problem.  Both source code and the tools needed to generate output
>> forms is needed for users to be able to use a modified version of the
>> program.
>>
>> /Simon
>>   
> If it's that hard to produce a minified version, then shouldn't
> we use the "normal" version? How much speed-up do we really
> get anyway (my wild guess: not much...)?

See:

$ ls -lh jquery*                             
-rw-r--r-- 1 bernat users 247K août  20 20:52 jquery.js
-rw-r--r-- 1 bernat users  81K août  20 20:52 jquery.js.gz
-rw-r--r-- 1 bernat users  93K août  20 20:53 jquery.min.js
-rw-r--r-- 1 bernat users  37K août  20 20:52 jquery.min.js.gz

A 44KB difference is pretty important for mobile users (which have poor
bandwidth and poor latency which makes bandwidth available at the
beginning of a TCP connection low).
-- 
Make sure your code "does nothing" gracefully.
            - The Elements of Programming Style (Kernighan & Plauger)

Attachment: pgp0_7SWypev_.pgp
Description: PGP signature


Reply to: