In comp.lang.javascript message <61b25f07-ab3a-462b-83df-f33a2c6dd695@34
g2000hsh.googlegroups.com>, Sun, 17 Aug 2008 17:49:08, shapper
<md*****@gmail.composted:
>
Is there any tool that merges various Javascript files into one single
file and minifies it?
I suppose that would be the best solution. Then I would use that file
on production mode ...
Much depends on the sort of people who are tempted to look at and into
your pages. But if your scripts have essential comment and a
reasonably-spaced layout you are more likely to get constructive
feedback on any errors and inefficiencies that they may show. And many
pages nowadays are so bloated with graphics that a small improvement in
script size, though in principle good, will not be significant.
For example, I noticed that JF (*.com) was using new Date("... CST") or
similar for an event occurring non-locally (in fact, over 10^9 km away
IIRC), predicted that Opera would get that wrong, verified the
prediction, mailed him, and it was fixed within an hour or two. But
another site (*.gov), similarly warned about mixing getYear and
getUTCMonth, has not yet fixed it. My js-date2.htm refers. Of course,
they *may* fix it before it next matters, at the Dec/Jan overlap. And
those with UK-like settings will not see any effect.
If your pages are coded as badly as many, you may reasonably want to
hide the script. You cannot make it executable but impossible to be
seen; but you can make it less easy to read so that casual observers may
not bother.
--
(c) John Stockton, nr London UK. replyYYWW merlyn demon co uk Turnpike 6.05.
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html-Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demon.co.uk/news-use.htm: about usage of News.
No Encoding. Quotes precede replies. Snip well. Write clearly. Mail no News.