[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Smallest JQuery FIles In The World

0ntariokingston

7/13/2015 5:14:00 PM

https://github.com/JavaScript-Packer/jquery-bzip-... is a collection of JQuery files that have been compressed to bzip2 and made client side extractable by adding an unpacker made in pure JavaScript. They were created on www.whak.ca/packer/JavaScript.htm where you can compress your own JS stuff. Many (most) of these JQuery files are half the size (or smaller) than any other samples, even half the size of the "min" versions on JQuery.com

If google used these files, they would save terrabytes of data.

There is an embedded sample there (HTM file), it gives best performance as no external files need to be called, less files to look for, etc.
29 Answers

Michael Haufe (\"TNO\")

7/13/2015 11:35:00 PM

0

On Monday, July 13, 2015 at 12:13:43 PM UTC-5, Dave Brown wrote:
> https://github.com/JavaScript-Packer/jquery-bzip-... is a collection of JQuery files that have been compressed to bzip2 and made client side extractable by adding an unpacker made in pure JavaScript. They were created on www.whak.ca/packer/JavaScript.htm where you can compress your own JS stuff. Many (most) of these JQuery files are half the size (or smaller) than any other samples, even half the size of the "min" versions on JQuery.com
>
> If google used these files, they would save terrabytes of data.
>
> There is an embedded sample there (HTM file), it gives best performance as no external files need to be called, less files to look for, etc.

And if I used gzip I wouldn't need a library at all and the page would load even faster since I wouldn't have to load it.

Not to mention compression and decompression is faster with gzip than bzip.

Shrinking a file to the smallest possible is not a win when the time to compress/decompress eats up the savings you might have gained from download speed.

0ntariokingston

7/14/2015 12:18:00 AM

0

https://github.com/JavaScript-Packer/jquery-bzip-...

You can't gzip a file and just use it anywhere, needs a server set up with gzip (most free hosting places do not have, over half of web sites do not have this. Also, it makes more work on your server to decompress the file for half of your clients. The time saved from downloading out weighs the 50 milliseconds to decompress (thats as fast as a eye blink, OMG, the wait) one of those jquery files

0ntariokingston

7/14/2015 12:23:00 AM

0

https://github.com/JavaScript-Packer/jquery-bzip-...
Those I can use even on Google's blogspot.com blog hosting, lets see you do that with your gzipped jquery files. Here is a bzipped jquery running on jsfiddle http://jsfiddle.net... , lets see you do that with your plain zipped file

0ntariokingston

7/14/2015 12:26:00 AM

0

https://github.com/JavaScript-Packer/jquery-bzip-... are good for standalone cell phone apps or web pages you want to run offline. How you gonna do that with just a gzipped file without client side decompression?

Michael Haufe (\"TNO\")

7/14/2015 2:48:00 AM

0

On Monday, July 13, 2015 at 7:17:52 PM UTC-5, Dave Brown wrote:
> https://github.com/JavaScript-Packer/jquery-bzip-...
>
> You can't gzip a file and just use it anywhere, needs a server set up with gzip (most free hosting places do not have, over half of web sites do not have this.

Provide some statistics for this. You are exaggerating to say the least. The last I've seen are ~15% and that is from 2009 [1]

> Also, it makes more work on your server to decompress the file for half of your clients.

Disregarding your "half" comment, why would you ever want to decompress the file on the fly from the server?

> The time saved from downloading out weighs the 50 milliseconds to decompress (thats as fast as a eye blink, OMG, the wait) one of those jquery files

bzip2 is still a poor decision [2]

[1] <http://www.stevesouders.com/blog/2009/11/11/whos-not-getting...
[2] <http://tukaani.org/lzma/benchmark...

0ntariokingston

7/14/2015 2:55:00 AM

0

https://github.com/JavaScript-Packer/jquery-bzip-... YOU ARE NOT FORCED TO USE THEM. Stop trolling me. This is about client side compression, so please go to another post...

Michael Haufe (\"TNO\")

7/14/2015 2:55:00 AM

0

On Monday, July 13, 2015 at 7:23:08 PM UTC-5, Dave Brown wrote:
> https://github.com/JavaScript-Packer/jquery-bzip-...
> Those I can use even on Google's blogspot.com blog hosting, lets see you do that with your gzipped jquery files. Here is a bzipped jquery running on jsfiddle http://jsfiddle.net... , lets see you do that with your plain zipped file

You're missing the point completely. The point is that you chose a poor compression algorithm and also exaggerate the scale of the problem.

If I wished to hack around an inability of a server to send compressed textual content and/or a client to accept it, I would probably use the referenced approach(s) and leverage more of the browser platform instead of loading yet another library. [1][2]

[1] <https://web.archive.org/web/20080801153841/http://blog.nihilogic.dk/2008/05/compression-using-canvas-and-pn...
[2] <http://www.iamcal.com/png-...

0ntariokingston

7/14/2015 2:59:00 AM

0

Speed tests on http://www.whak.ca/spee... (appears bzip is faster than gzip, lol)

https://github.com/JavaScript-Packer/jquery-bzip-...

0ntariokingston

7/14/2015 3:01:00 AM

0

PNG compression you mention, here is my PNG packer, 3 different algorithms, the first one uses zlib compression http://www.whak.ca/pack...

Michael Haufe (\"TNO\")

7/14/2015 3:12:00 AM

0

On Monday, July 13, 2015 at 9:58:56 PM UTC-5, Dave Brown wrote:
> Speed tests on http://www.whak.ca/spee... (appears bzip is faster than gzip, lol)

Given the erroneous JavaScript on your page, to say that I don't believe your numbers is an understatement to say the least...