Search code examples
coldfusioncommentsconditional-comments

Coldfusion comments and IE conditional comments


Do you use two (HTML comments) or three (ColdFusion comments) dashes for inline IE conditional statements in a .cfml file?

Example:

<!--[if lt IE 9]>
   <script>..do something..</script>
<![endif]-->

I am pretty sure the code is the same regardless of whether it is in an HTML file or CFML file. Can anyone validate? Thank you.


Solution

  • Coldfusion comments (3 dashes) will not be included in the output that is sent to the browser. So you'll have to use regular html comments (2 dashes).