|
Posted by Rory Browne on 10/21/66 11:15
Besides, whether or not it's considered good practice to comment out
js to non-js-capable browsers, a lot of people do it.
And for the record, I wouldn't condone the removal of comments from
code that someone may need to read sometime. HTML outputted from php
is generally however only meant for the browser to parse, and not for
humans to read.
Which brings me to another suggestion:
If you have a lot of long javascript variable/function names, you
could maybe find a way to automagicly (I mean automaticly, but
automagicly sounds cooler) shorten local variables, function names,
and perhaps other stuff, although I think for the most part linking
the JS, so that it is cacheable is probably a better option.
How about using xml/xslt to only pass on the content that is unique to
each page to the browser. You could use an ob handler to make sure
that the browser was capable of using xslt, and if not parse the xslt
on the server.
[Back to original message]
|