• Resolved Anonymous User 14978628

    (@anonymized-14978628)


    Hi, In cpanel there is an option to compress content (gzip). If this is enabled do we need to enable gzip compression in the Comet Cache options? Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • Raam Dev

    (@raamdev)

    @martychc23 You shouldn’t need to enable it in Comet Cache if it’s already enabled in cPanel. The best thing to do is run a test on your site after enabling GZIP to confirm it has been enabled. I recommend https://checkgzipcompression.com/.

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    ok, i didn’t think so. Just wanted to check as i’ve just switched to Comet Cache.

    Actually what made me switch was that CC outputs security headers when i have them configured. This was something i was unable to do with other caching plugins.

    There is one header i haven’t been able to output, however, and that is “referrer policy”. Is it possible to output this security header with CC?

    // Referrer Policy
    header(‘Referrer-Policy: no-referrer-when-downgrade’);

    Raam Dev

    (@raamdev)

    @martychc23 Can you explain how you’re adding those headers? Are you using a plugin?

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    I’ve added the following by putting them in my functions.php

    // Security Headers
    add_action(‘send_headers’, function(){
    // Enforce the use of HTTPS
    header(‘Strict-Transport-Security: max-age=31536000; includeSubDomains; preload’);
    // Referrer Policy
    header(‘Referrer-Policy: no-referrer-when-downgrade’);
    }, 1);

    And the rest were added by Shield Security plugin (https://en-gb.wordpress.org/plugins/wp-simple-firewall/)

    The referrer policy header was the only one i couldn’t get working as tested here:

    https://securityheaders.io/

    Raam Dev

    (@raamdev)

    @martychc23 Does the Referrer-Policy header work if you disable Comet Cache?

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    yes, it also works when serving a page for the first time (uncached) with CC enabled.

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Just another quick question, does CC output the “If-Modified-Since HTTP header” as i’ve noticed it’s missing since installing the plugin?

    Raam Dev

    (@raamdev)

    Regarding the Referrer-Policy header: We need to add that to the Comet Cache HTTP Header Whitelist so that it doesn’t get stripped out when serving cache files. I’ve opened a Feature Request for this here and we’ll see if we can this added in the next release (coming within the next few weeks): https://github.com/websharks/comet-cache/issues/892

    Regarding the If-Modified-Since header: Comet Cache support this for static resources (e.g., images, CSS, JS, etc.) but not for serving the cache files themselves. WordPress Core itself used to strip out the If-Modified-Since header and Comet Cache was following their lead on that, but it looks like WordPress Core has since added support for If-Modified-Since. Comet Cache now needs to be updated to do the same. We have a long-standing GitHub issue open about this and I just posted an update with the latest information; see my comment here: https://github.com/websharks/comet-cache/issues/255#issuecomment-304394481

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Thanks for updating me on these issues. I read the feature requests you linked to and noticed you mentioned CC supports the ETag headers. Could you tell me if i should keep or remove the following in my htaccess?

    <IfModule mod_headers.c>
    Header unset ETag
    FileETag None
    </IfModule>

    Raam Dev

    (@raamdev)

    @martychc23 Comet Cache Pro adds the following to the .htaccess when you enable Leverage Browser Caching. If you want to enable Browser Caching, here’s what you can use:

    # Enable browser caching.
    FileETag mtime size
    
    <IfModule expires_module>
      ExpiresActive on
      ExpiresDefault "access plus 1 week"
    </IfModule>
    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    great, thanks for your help!

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Gzip In Cpanel’ is closed to new replies.