469,331 Members | 1,879 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,331 developers. It's quick & easy.

Documentation

296 100+
Hello,

I want to do documentation of my HTML code present in various files .

Is commenting the only way to documentation ?

Is there a way such that the documentation part is not loaded into the memory ?
Mar 8 '07 #1
9 1264
AricC
1,892 Expert 1GB
Hello,

I want to do documentation of my HTML code present in various files .

Is commenting the only way to documentation ?

Is there a way such that the documentation part is not loaded into the memory ?
By loaded into memory do you mean viewable by the public?
Mar 8 '07 #2
pankajit09
296 100+
By loaded into memory do you mean viewable by the public?
I mean the part which is commented should not be loaded into the memory.

Also answer my first question ?
Mar 8 '07 #3
AricC
1,892 Expert 1GB
I mean the part which is commented should not be loaded into the memory.

Also answer my first question ?
The only way the comments aren't going to be viewable is if you have them on the server side anything written in HTML is viewable to everyone who visits your site.
Mar 8 '07 #4
jhardman
3,406 Expert 2GB
Yeah, so if you save the file as an asp and include comments like:
Expand|Select|Wrap|Line Numbers
  1. <%
  2. 'here is the first table that my stupid boss wanted to put in,
  3. 'but I don't want her to see what I really think of her %>
this will still be in the file on your computer, but won't make it to the user's.

Jared
Mar 9 '07 #5
drhowarddrfine
7,435 Expert 4TB
jhardman,
Since more people don't use asp than do, that won't help.
Mar 10 '07 #6
jhardman
3,406 Expert 2GB
jhardman,
Since more people don't use asp than do, that won't help.
No really. If you want a comment to stay in the code but not sent to the browser, this is a good way to do it. ASP files are still plain text, no need to change anything from the HTML file except the extension. Most web servers can handle ASP (I guess you need an add-on if you're using apache, but most professional servers either already have the add-on in place or are using like IIS or something that interprets it natively).

The only real option, unless I'm just missing what the asker was asking, is for the server to remove the comment before sending it to the browser, and that means some type of server-side scripting, whether it be javascript or PHP or whatever. None of these options require any great deal of coding, you are just adding a comment.

So I guess the most common web-server is apache, right? so maybe you should save it as .php and use a php comment. Apache will open it up, remove the comment and send it to the user's machine. Is that wrong?

Jared
Mar 14 '07 #7
AricC
1,892 Expert 1GB
The only real option, unless I'm just missing what the asker was asking, is for the server to remove the comment before sending it to the browser, and that means some type of server-side scripting, whether it be javascript or PHP or whatever. None of these options require any great deal of coding, you are just adding a comment.
Jared
Javascript isn't server side scripting.
Mar 14 '07 #8
drhowarddrfine
7,435 Expert 4TB
I don't think anyone is going to want to mess with installing asp stuff just to remove comments. I don't think any hosting service would do it. I think they'd have to install Mono but why? No, that's a huge leap. It's not just a matter of flipping a switch. I know I can't do that with lighttpd.
Mar 14 '07 #9
jhardman
3,406 Expert 2GB
Javascript isn't server side scripting.
Javascript can be done server side. ASP doesn't refer to the language used, so much as the technique. IIS or PWS will interpret it just fine as long as it is within the <% %> asp code tags, and the latest asp.net supports a half dozen languages or so. I don't know if apache supports it yet, but I don't see why it wouldn't. By the way, I think IE as far back as 4 can interpret vbscript on the browser side.

drhoward, I actually agree with you, I was just trying to find a solution to pankajit's original question. I don't see any other obvious way to remove the comments as they are sent to the browser. Do you see a solution that I don't?

Pankajit09, I may not be speaking for anyone else, but when I look in someone else's code and see that it is well documented, my first impression is that it makes it very clear and easy to understand, and it looks very professional. Is there any particular reason you are worried about passing your documentation on?

Jared
Mar 14 '07 #10

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

20 posts views Thread by Daniel R. Smorey Jr. | last post: by
24 posts views Thread by Christopher J. Bottaro | last post: by
reply views Thread by Jeff Levinson [mcsd] | last post: by
1 post views Thread by Ole Hanson | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.