-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: URI Exclusions for HTML Compressor #651
Comments
Step 1
Step 2Add UI option for:
After this line here echo ' <h3>'.__('URI Exclusions for HTML Compressor?', SLUG_TD).'</h3>'."\n";
echo ' <p>'.__('When you enable HTML Compression above, you may want to prevent certain pages on your site from being cached by the HTML Compressor. This is where you will enter those if you need to (one per line). Searches are performed against the <a href="https://gist.github.com/jaswsinc/338b6eb03a36c048c26f" target="_blank" style="text-decoration:none;"><code>REQUEST_URI</code></a>; i.e., <code>/path/?query</code> (caSe insensitive). So, don\'t put in full URLs here, just word fragments found in the file path (or query string) is all you need, excluding the http:// and domain name. A wildcard <code>*</code> character can also be used when necessary; e.g., <code>/category/abc-followed-by-*</code> (where <code>*</code> = 0 or more characters that are NOT a slash <code>/</code>). Other special characters include: <code>**</code> = 0 or more characters of any kind, including <code>/</code> slashes; <code>^</code> = beginning of the string; <code>$</code> = end of the string. To learn more about this syntax, please see <a href ="http://zencache.com/r/watered-down-regex-syntax/" target="_blank">this KB article</a>.', SLUG_TD).'</p>'."\n";
echo ' <p><textarea name="'.esc_attr(GLOBAL_NS).'[saveOptions][htmlc_uri_exclusions]" rows="5" spellcheck="false" class="monospace">'.format_to_edit($this->plugin->options['htmlc_uri_exclusions']).'</textarea></p>'."\n";
echo ' <p class="info">'.__('<strong>Tip:</strong> let\'s use this example URL: <code>http://www.example.com/post/example-post-123</code>. To exclude this URL, you would put this line into the field above: <code>/post/example-post-123</code>. Or, you could also just put in a small fragment, like: <code>example</code> or <code>example-*-123</code> and that would exclude any URI containing that word fragment.', SLUG_TD).'</p>'."\n";
echo ' <p class="info">'.__('<strong>Note:</strong> please remember that your entries here should be formatted as a line-delimited list; e.g., one exclusion pattern per line.', SLUG_TD).'</p>'."\n";
|
Thanks for catching that! Fixed in wpsharks/comet-cache-pro@2a6e3a7. No need to open an issue for that one. |
That looks great! Nice work! 😄 @jaswsinc How's this look to you? |
Updated links to use the |
Looks fantastic! Nice work @renzms. @raamdev Looks like there will be one additional step needed to read the list of exclusions and prevent the HTML Compressor from running whenever one of the patterns matches the current URI. I think that code should be added to the HTML Compressor itself though. I just released a new version of the HTML Compressor to support this. @renzms Next Actions (Step 3 of this Issue)
|
@renzms I noticed that you added a |
Noted! PR submitted and ready for review. |
Next Pro Release Changelog:
|
ZenCache v160222 has been released and includes changes from this GitHub Issue. See the v160222 announcement for further details. This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#651). |
@renzms writes in #650 (comment)...
We currently have JavaScript and CSS Exclusion options in the HTML Compressor; a new "URI Exclusion Patterns" section sounds like a good idea to me.
The text was updated successfully, but these errors were encountered: