All Collections
General Settings
How to "Keep HTML comments" in NitroPack
How to "Keep HTML comments" in NitroPack
Updated over a week 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.

For example: Consider a scenario involving complications with your Magento cart functionality—certain clients might encounter challenges when attempting to load the cart subsequent to product additions. This is precisely when the utility of the option becomes apparent, as it allows for the preservation of HTML comments, preventing their removal.

It's worth noting that the tally of products appended to the cart could conceivably be encoded within your website as an HTML comment. Hence, the activation of this option serves to reinstate your Magento cart to its customary operational state.

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.

📌 If you need any assistance or have questions, you can contact our Support team using the chat bubble on the bottom right of this page.

Did this answer your question?