• Resolved CB

    (@cbrandt)


    Hi,

    Couple of questions:

    1) I wonder what’s the role of SG-Optimizer in setting some cache-related HTTP headers, specially:

    cache-control: no-cache, must-revalidate, max-age=0

    This header in present in any URL on a standard WP installation, and it doesn’t change after installing SG Optimizer. So I’d assume it is a header WP itself adds to prevent caching issues in blogs with comments. Since my website does not allow comments, I’d like to have this header changed, and I thought SG Optimizer would do it.

    As it is, the above header prevents Cloudflare from caching the pages even when I set a Cache Everything page rule to include the caching of HTML.

    2) Also, I’d like to know if SG Optimizer has any plans to let users define the expiration of their browser caching by file type. Currently the plugin adds a section on .htaccess that includes, which defines expiration by content type (CSS, JS, HTML etc). One can always manually edit this on .htaccess, but it would be nice if this could be set from the plugin’s interface.

Viewing 1 replies (of 1 total)
  • Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Hey,

    1. Yes, WordPress has function to avoid certain caching issues in the header – the wp_get_nocache_headers function which adds:

    ‘Cache-Control’ => ‘no-cache, must-revalidate, max-age=0’

    This said, by default it’s not called in the site’s front end. You should check why that’s happening.

    2. We use cookies and not headers to operate the dynamic caching. We do not interfere with these headers in any way. As to your other question, yes, we plan adding more interfaces for better management. Meanwhile, you may modify your .htaccess file as per your needs. If you don’t turn it off and on again, it will remain unchanged.

Viewing 1 replies (of 1 total)
  • The topic ‘Cache control HTTP header’ is closed to new replies.