Ignore specific HTML sections

13 views
Skip to first unread message

Jim Bo

unread,
Mar 18, 2016, 6:56:01 AM3/18/16
to mod-pagespeed-discuss
It would be useful to be able to tag sections of code to not apply filters to.

We're using commented HTML in some pages to have the code ready for an instant display. Currently, with the 'strip comments' filter, this removes all the code waiting to be used :)

We are using url-based rules to ignore pages with that code on, but if this could be included in the code it would be one less thing to explain to people running our software.

Eg. if we could have something like this:

<!--pagespeed_ignore--><!-- other code --><!--end_pagespeed_ignore-->

then it would just output this:

<!-- other code -->

Does something like this exist or would it be feasible?

Joshua Marantz

unread,
Mar 18, 2016, 8:08:01 AM3/18/16
to mod-pagespeed-discuss
It's feasible, but we already have something else in the product that might meet your needs, if what you are trying to do is make PageSpeed refrain from stripping comments that can be matched against a wildcard pattern, e.g.
  ModPagespeedRetainComments other*


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/922f43df-862d-4606-8402-940738bec2e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jim Bo

unread,
Mar 19, 2016, 1:50:38 AM3/19/16
to mod-pagespeed-discuss
Ah thanks, I missed that - that looks perfect for us.


On Friday, March 18, 2016 at 7:08:01 PM UTC+7, jmarantz wrote:
It's feasible, but we already have something else in the product that might meet your needs, if what you are trying to do is make PageSpeed refrain from stripping comments that can be matched against a wildcard pattern, e.g.
  ModPagespeedRetainComments other*

Reply all
Reply to author
Forward
0 new messages