ltm rule command HTML commentΒΆ

iRule(1)					  BIG-IP TMSH Manual					     iRule(1)

HTML::comment
       Query and update HTML comment.

SYNOPSIS
       HTML::comment ((append STRING) | (prepend STRING) | remove)?

DESCRIPTION
       Queries, removes HTML comment or appends/prepends it by a string.

       HTML::comment Return the entire HTML comment, including the opening and the closing delimiter.

       HTML::comment append  Insert a string after the closing delimiter of the HTML comment; when multiple
       appends are issued, the inserted strings are ordered according to the sequence of the append commands as they
       are issued for the given comment.

       HTML::comment prepend  Insert a string before the opening delimiter of the HTML comment; when multiple
       prepends are issued, the inserted strings are ordered according to the sequence of the prepend commands as
       they are issued for the given comment.

       HTML::comment remove Remove the HTML comment.

RETURN VALUE
       HTML::comment returns the entire HTML comment; others do not return anything.

VALID DURING
       HTML_COMMENT_MATCHED

EXAMPLES
	when HTML_COMMENT_MATCHED {
	    if { ! ( [HTML::comment] contains "\[" ) } {
		HTML::comment remove
	    }
	}

	when HTML_COMMENT_MATCHED {
	    HTML::comment append "some_string"
	}

	when HTML_COMMENT_MATCHED {
	    HTML::comment prepend "some_string"
	}

HINTS
       The httpcompression profile, which strips off the Accept-Encoding header from the HTTP request headers so that
       the backend server does not respond to BIG-IP with compressed content, can be used to allow the HTML filter to
       see the HTTP body (containing HTML) uncompressed. Alternatively, using an iRule command such as HTTP::header
       remove "Accept-Encoding" in the HTTP_REQUEST event will accomplishes the same thing.

       The HTML::enable command running in HTTP_RESPONSE enables HTML processing for every transaction in a flow.
       Adding some iRules to selectively enable (or disable) HTML based on the Content-Type header in HTTP response
       helps to improve performance.

       Internet Explorer-specific conditional comments, which contain brackets, should not be removed, and the iRule
       recognizes these as HTML comments.

SEE ALSO
CHANGE LOG
       @BIGIP-11.0.0
	   --First introduced the command.

BIG-IP						      2020-06-23					     iRule(1)