Simon Wiseman
Member
Hi,
I've got some JavaScript in my web pages, but notice that the web image compression utility removes end-of-lines from HTM and CGI files, presumably to save a bit of space.
Unfortunately, JavaScript // comments are terminated by end-of-line, so if you use them the rest of your web page gets commented out. To avoid this I recommend using C style comments instead, ie. /* comment */, or save space by not having comments!
Another downside of the compression removing eol's is that the browser sees one line of HTML and so if it needs to report an error (dunno about you, but I get this a lot!) you get "line 1, character n" which doesn't match up with your source code. This does make debugging a pain. Any chance you could make the compression less fearsome - after all it's not saving that much data.
Cheers
Simon
I've got some JavaScript in my web pages, but notice that the web image compression utility removes end-of-lines from HTM and CGI files, presumably to save a bit of space.
Unfortunately, JavaScript // comments are terminated by end-of-line, so if you use them the rest of your web page gets commented out. To avoid this I recommend using C style comments instead, ie. /* comment */, or save space by not having comments!
Another downside of the compression removing eol's is that the browser sees one line of HTML and so if it needs to report an error (dunno about you, but I get this a lot!) you get "line 1, character n" which doesn't match up with your source code. This does make debugging a pain. Any chance you could make the compression less fearsome - after all it's not saving that much data.
Cheers
Simon