By the way, if you want to reduce code and you code a "proper" way (I'm
sure that's what you do), you can go for hunting any line like the one
below (the last one you sent, for setWidth I guess),
> if (noevt!=false) this.invokeEvent('resize');
and replace with less elegant things like
if (!noevt) this.invokeEvent('resize');
"much" shorter. If any little byte counts, you can consider that work. Just
in case, watch out not to do this on parameters that have a signification
if zero, because zero can be tested to falsed, when it may just mean the
zero integer...
In fact, a much interesting thing is use ESC by Thomas Loo (sorry, I cant't
find back the exact URL, look in the archive), so you can leave all the
comments and indentation right there, it will compact it a lot, by removing
unnecessary blanks and comments
Then a few tricks, that work quite well in the field of weight reduction:
Definitely use GZIP compression, it is supported by IE and NS, if you
consider a few work-arounds for their buggy implementation. See, I made
*very* heavy use of javascript for a project, and I had to find way to
reduce the download time. Now the results: 415Kb -> 24,5kb ouch !
Using gzip compression to acheive bandwidth reduction involves however a
few things. If you try to compress individually each js file you're doing
wrong. I group files together (using ESC ) so that from 87 files in 16
folders I get only 5 files.
I use mod_gzip, a module for the apache webserver to provide transparent
gzip serving, however I compress the files myself and the only job mod_gzip
has to do is to check if the browser accepts gzip compression and look if
the gzip file is up to date.
Another thing I have used, more offtopic but it can be useful, is to
generate most repetitive content (like list of items in tables) using
document.write. (that's why my code starts from 415kb). It provides huge
gains, as the client only downloads data, not data+layout each time,
however I must admit that it is not so easy to maintain, because the layout
is baked into some javascript.
You see Doug, there are many ways to reduce bandwidth usage, I think you
should start by using ESC + mod_gzip and a makefile, and if it is not
enough, generate HTML content, if it is repetitive, using sent once javascript.
As I reread what I just wrote, I find myself very unclear, sorry. If
anybody has questions, I could maybe more precisely explain some specific
point ("youpi" as they say in France, free consulting :-)
Regards
Marc
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help