[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-16 Thread polyrhythmic
@Stephen: Nice trick, I'll be adding it to my bag! To all: If you're already using PHP includes and JSMin why not go all the way to Minify? I use Minify ( http://code.google.com/p/minify/ , thx rgrove) for my JS CSS. With jQuery, nearly all of us are using more than one JavaScript include,

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-16 Thread polyrhythmic
@Erik: (Damn this Groups post delay...) Minify does exactly that, but with CSS too. Minifying, caching, and single-request serving. On Aug 15, 2:32 pm, Erik Beeson [EMAIL PROTECTED] wrote: I cache the packed versions. Actually, I concatenate all of the scripts that I need for a page, minify

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-16 Thread Erik Beeson
Right, just like that, but written in Java. I also do CSS, but that's just a matter of a few regexps. --Erik On 8/15/07, polyrhythmic [EMAIL PROTECTED] wrote: @Erik: (Damn this Groups post delay...) Minify does exactly that, but with CSS too. Minifying, caching, and single-request

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread gradez28
Very nice! I have never bothered messing with compression before but now that I'm writing a rather large web app i need to make it as lean as possible. According to firebug I trimmed off 20% of my js size by piping all the JS through this! :)

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Brandon Aaron
Thanks for sharing this. Use the minified version instead of the packed version for even better file size savings. :) -- Brandon Aaron On 8/15/07, Stephan Beal [EMAIL PROTECTED] wrote: Hi, all! i'm working on re-designing the web site for my mother's company, which was horribly

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Stephan Beal
On Aug 15, 2:33 pm, Brandon Aaron [EMAIL PROTECTED] wrote: Thanks for sharing this. Use the minified version instead of the packed version for even better file size savings. :) i experimented on that. i expected the new YUI minifier to give better compression (as it does on all of my plugins),

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Brandon Aaron
Yeah, the packer does a good job initially but doesn't do a good job of getting gzipped. At least with my testing, I'm able to get a better file size by using the min version + gzip. jQuery is only around 11k doing it that way. -- Brandon Aaron On 8/15/07, Stephan Beal [EMAIL PROTECTED] wrote:

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Joel Birch
On 8/15/07, Brandon Aaron [EMAIL PROTECTED] wrote: Yeah, the packer does a good job initially but doesn't do a good job of getting gzipped. At least with my testing, I'm able to get a better file size by using the min version + gzip. jQuery is only around 11k doing it that way. -- Brandon

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Stephan Beal
On Aug 15, 3:33 pm, xavier [EMAIL PROTECTED] wrote: This means that : 1) you assume all clients are able to deal with compressed pages No - PHP does that negotiation automatically (supposedly) and ignores the gzip if it thinks the client can't handle it. 2) your server is going to compress

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread James Dempster
Before ob_gzhandler() actually sends compressed data, it determines what type of content encoding the browser will accept (gzip, deflate or none at all) and will return its output accordingly. From http://uk.php.net/ob_gzhandler On Aug 15, 2:33 pm, xavier [EMAIL PROTECTED] wrote: This means

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Joel Birch
On 8/15/07, Stephan Beal [EMAIL PROTECTED] wrote: @Joel/Brandon: after more experimentation, i am getting better compression if i use the YUImin and ob_gzhandler. The difference is minimal compared to jsmin, but there is a difference. e.g. jquery 1.1.3.1: YUImin + gzip: 10896 bytes jsmin

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread xavier
This means that : 1) you assume all clients are able to deal with compressed pages 2) your server is going to compress it for each visitor. 3) the headers might or might not be properly dealing with its type. With mod_rewrite, they are nice tricks to have a compressed file and serve it instead

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Ganeshji Marwaha
Very cool... I will start using this technique right away... But my only concern is, since this technique compresses the file everytime it is requested, isn't it an overkill on the server's CPU? -GTG On 8/15/07, Stephan Beal [EMAIL PROTECTED] wrote: Hi, all! i'm working on re-designing the

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Erik Beeson
I cache the packed versions. Actually, I concatenate all of the scripts that I need for a page, minify them (used to use packer, now I use YUImin), and then cache that, all on the fly. So I have one script tag like: script type=text/javascript src=/myscriptmerger/dimensions.js,sort.js,

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Stephan Beal
On Aug 15, 11:02 pm, Ganeshji Marwaha [EMAIL PROTECTED] wrote: Very cool... I will start using this technique right away... But my only concern is, since this technique compresses the file everytime it is requested, isn't it an overkill on the server's CPU? Getting this level of transparency

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Stephan Beal
On Aug 15, 11:32 pm, Erik Beeson [EMAIL PROTECTED] wrote: I cache the packed versions. Actually, I concatenate all of the scripts that I need for a page, minify them (used to use packer, now I use YUImin), and then cache that, all on the fly. So I have one script tag like: The problem with

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Stephan Beal
On Aug 15, 11:08 am, Stephan Beal [EMAIL PROTECTED] wrote: ... This approach could just as easily be used to combine all required JS scripts on the fly (just be sure to insert a ';' after each one to accommodate scripts which don't have them), then gzip them, to help reduce the overall

[jQuery] Re: stupid dev tricks: gzipping jQuery without mod_deflate

2007-08-15 Thread Erik Beeson
Ah, good to know. In my case, we're running on our own servers, so that isn't too big an issue. Also, we're using Java, and store the cache files in the webapp's temporary directory, and set them to delete on exit (java.io.File.deleteOnExit()), so they get trashed when we restart the server. But