By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,879 Members | 1,809 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,879 IT Pros & Developers. It's quick & easy.

Documentation

100+
P: 296
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
Share this Question
Share on Google+
9 Replies


Expert 100+
P: 1,892
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

100+
P: 296
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

Expert 100+
P: 1,892
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
Expert 2.5K+
P: 3,405
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
Expert 5K+
P: 7,435
jhardman,
Since more people don't use asp than do, that won't help.
Mar 10 '07 #6

jhardman
Expert 2.5K+
P: 3,405
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

Expert 100+
P: 1,892
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
Expert 5K+
P: 7,435
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
Expert 2.5K+
P: 3,405
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.