This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes how to remove comments from html ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to remove comments from html ?" Watch "how to remove comments from html ?" New topic
Author

how to remove comments from html ?

vijay mahendra
Ranch Hand

Joined: Jan 01, 2007
Posts: 51
hi all,

how to remove comments automatically from html ?

please help me in this.


thanks in advance

vijay
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Remove where?

Eric
vijay mahendra
Ranch Hand

Joined: Jan 01, 2007
Posts: 51

remove from html page in production environment..

generally we add comments in development time.But i want to remove comments automatically from html page or jsp page
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Do you have a build process? If you do that is the right place to do it. Simple regular expression should be able to do the find and replace.

There are html compressors that remove whitespace, most of them will also remove the comments.

Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to remove comments from html ?
 
Similar Threads
remove pluging
How code that is commented work?
username and password are not getting verified by tomcat
Library to remove HTML tags and comments
HTML sanitization