Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Do you comment your Javascript code?


Message #1 by "Anil Rhemtulla" <AnilR@T...> on Mon, 23 Apr 2001 13:29:56 +0200
This is a multipart message in MIME format.
--=_alternative 004A20DD85256A38_
Content-Type: text/plain; charset="us-ascii"

If you're creating ASP pages, could you put your comments between the ASP 
brackets?  Then you comments would remain on the server and not 
downloaded.  I'm new to creating in ASP so I'm not sure --- Would that 
make a difference or be helpful on the client end?
Something like this:

        <% 
        'some comment here
        %>

I like to comment out my work.  I know what it's like to join a 
team-of-one after someone has left and not have a clue why a page looks 
the way it does.  Just understanding the code does not always explain "the 
method to the madness."  My hope is that my comments will give insight to 
those that will come after me.

KMW

------------------------------------------------------
Hi All.

I hesitate to add JS comments in my code for two reasons:
- I think it is a waste of bandwidth for the client.
- I would rather not make the code easier for other people to decipher.

That said, not using comments is a pretty bad coding practice. So I was 
wondering what the rest of you do? Can anyone recommend a good little 
comment stripping utility that could be used before the pages are 
published? (Preferably one that work with ASP pages too). Or should I just 
bite the bullet and start adding comments?

Cheers,
Anil


kathleen.m.whalen@c... 
$subst('Email.Unsub')





  Return to Index