Skip to main content

How to "Keep HTML comments" in NitroPack

Updated over 2 weeks ago

By default, our service autonomously expunges HTML comments that your developers may have incorporated into your code for the reasons stated above.

Nevertheless, occasional circumstances might arise where this standard procedure encounters complications.

You may enable the option through your NitroPack app -> Settings -> HTML & CSS -> Keep HTML comments.

❗Once enabled, please do a Full Purge.

What are HTML comments?

HTML comments are used to include notes or explanations within the HTML code that won't be displayed to users when they view the webpage and are ignored by web browsers.

They are mainly intended for developers and designers to document their code, provide context, or temporarily disable certain sections of code without deleting them.

HTML comments are denoted by the following syntax:

Anything placed between <!-- and --> will be treated as a comment and won't affect the display or functionality of the webpage. For example:


In this example, the first comment won't be visible on the webpage, and the second comment temporarily disables the paragraph from rendering, effectively hiding it from the webpage.

Did this answer your question?