@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,
@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
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
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! :)
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
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),
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:
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
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
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
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
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
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
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,
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
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
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
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
18 matches
Mail list logo