• Resolved Anonymous User 14978628

    (@anonymized-14978628)


    Hi,

    My CDN is recommending i send both ETags and If-Modified-Since.

    I can send ETags with Comet Cache enabled, but not If-Modified-Since.

    If-Modified-Since is only sent if I disable Comet Cache.

    Do you know if this is going to be supported in the next update and when that is likely to come? Seems like quite an important header so surprising not to see it already supported.

Viewing 6 replies - 1 through 6 (of 6 total)
  • @martychc23 For a long time, WordPress Core itself removed the If-Modified-Since header and when Comet Cache was originally written it followed that same behavior, because the If-Modified-Since header is tricky to do in such a dynamic environment like WordPress.

    However, WordPress Core has since added support for sending the If-Modified-Since header (or rather, it has stopped automatically removing it), however Comet Cache has not yet been updated to support this.

    We do plan to change this in a future release to allow the If-Modified-Since header and there’s a GitHub issue here with a comment describing the current state of Comet Cache + If-Modified-Since: https://github.com/websharks/comet-cache/issues/255#issuecomment-304394481

    I recommend following that GitHub issue for updates.

    I should add that Comet Cache does support If-Modified-Since headers for static assets (e.g., images, CSS, JavaScript), which is normally what you’d be caching on a CDN anyway.

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    Is there any ETA on the next update?

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    I should add that Comet Cache does support If-Modified-Since headers for static assets (e.g., images, CSS, JavaScript), which is normally what you’d be caching on a CDN anyway.

    Could you explain how we enable this for static assets? Checking my site with pingdom i only see the Etag but not last modified time for static assets. Last modified is currently only shown if i disable the plugin.

    You just need to make sure the following is in your .htaccess file (if this isn’t working, I recommend double-checking with your web hosting company, in case their server configuration is different):

    <IfModule expires_module>
      ExpiresActive on
      ExpiresDefault "access plus 1 week"
    </IfModule>

    For static resources, your web server sends the If-Modified-Since headers with those requests. Requests for static resources don’t even go through PHP or WordPress, so Comet Cache wouldn’t have any effect on them.

    Thread Starter Anonymous User 14978628

    (@anonymized-14978628)

    ah, ok, already had that. Thought i might need something else. Thanks!

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

The topic ‘If-Modified-Since Header’ is closed to new replies.