Packing is probably not the fastest method, unless you're in a low-
bandwidth situation, due to the overhead of decoding the packed script
after download.  I would recommend Minifying your JS -- the most well
known is probably JSMin (http://javascript.crockford.com/jsmin.html)
but there's a number of derivatives and mods out there for personal
preferences.  For loading time comparisons, check John Resig's site:
http://ejohn.org/blog/library-loading-speed/ .

Gzip is a compression & transmission method that can be done from a
PHP environment or on other servers: If the server determines from the
headers that the client can accept gZip'd files the server compresses
the file before sending it, and it has low overhead for the client.
If you are familiar with using the output buffer ob_start() in PHP for
speed you can easily use gZip when available with ob_gzhandler:
http://us.php.net/ob_gzhandler .

I personally prefer Minify (http://code.google.com/p/minify/) because
that way it packs and caches my scripts automatically, so I don't have
to do it manually every time I change a line.  There are a lot of
resources out there, just Google "Gzip http" and find what's
appropriate for your server/language.

HTH

Charles

On Feb 14, 6:33 am, MorningZ <[EMAIL PROTECTED]> wrote:
> One option is to use Dean Edward's "packer" tool:
>
> http://dean.edwards.name/packer/
>
> If your packed file(s) don't work, you may need to run it through
> JSLint (http://dean.edwards.name/packer/) and fix it up before packing
> (having proper ending semicolons is a big thing to look out for)

Reply via email to