aspose file tools*
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
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
username and password are not getting verified by tomcat
HTML sanitization
How code that is commented work?
remove pluging
Library to remove HTML tags and comments