|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Stripping HTML comments before sending to client
Hey,
I'm looking for a way to have HTML comments stripped from my server's response before it's sent across to the client. Basically like this: Code:
|-----------------| |----------------------| | | | | | file on server | --------------> | data sent to client | | (with comments) | | (no comments) | | | | | |-----------------| |----------------------| Any thoughts are appreciated, and any appreciation of my text art is welcome! Thanks! |
|
#2
|
|||
|
|||
|
Is this question somehow related to IIS?
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Quote:
Well, I figured if it's possible it has to be a server setting and the server I'm using is IIS. Sorry if it should be somewhere else. |
|
#4
|
|||
|
|||
|
I don't know of any such IIS setting, but that doesn't mean such a setting doesn't exist.
|
|
#5
|
||||
|
||||
|
There isn't a setting for that. You'll have to implement it via an ISAPI that handles the outgoing response and does a Regex string operation to remove them.
However, if your pages are already *.asp or *.aspx files, you can do a quickie by replacing this: Code:
<!-- this is an SGML comment --> With this: Code:
<%-- this is an ASP comment --%> You can easily replace them using some kind of site mangement software that supports "Find and Replace in Files" "<%--" is the ASP syntax for an ASP comment. You can also use language-specific comment delimiters Such as: Code:
<%'VBScript comment %> <%//JScript comment %> HTH |
![]() |
| Viewing: ASP Free Forums > System Administration > Microsoft IIS > Stripping HTML comments before sending to client |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|