• Resolved falondrian

    (@falondrian)


    Hello, I have the same issue as this:

    https://www.ads-software.com/support/topic/woff-and-woff2-font-missing-cache-control/

    Pretty sure its a W3 bug, maybe this information helps fixing it: I uploaded “wp-content/fonts/*.woff2” via custom files list to S3. All fonts are missing the cache control header, EXCEPT for one font in the bucket, very strange behavior. I could verify the same behavior with another folder that has two fonts – one of the fonts has the header, the other doesn’t. Manually adding the meta data on S3 works without a problem but is kinda tedious.

    “Set expires header” for Media is enabled in browser cache options.

    Nginx:
    location ~ \.(ttf|ttc|otf|eot|woff|woff2|font.css)$ {
    expires 31536000s;
    etag on;
    if_modified_since exact;
    add_header Pragma “public”;
    add_header Cache-Control “public”;
    add_header Access-Control-Allow-Origin “*”;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @falondrian

    Thank you for your inquiry and I am happy to assist you with this.
    This issue may occur rarely and it depends on a hosting environment and the AWS settings so it’s not a bug in W3 Total Cache.
    The way to understand this is when the CDN is not being used, the font files have the cache-control header. The issue only occurs, and I must repeat very rarely, once the AWS CDN is being used.
    So in these cases, either Manually adding the metadata on S3 is a solution or making sure that AWS is expecting the origin rules.
    Thanks!

    Thread Starter falondrian

    (@falondrian)

    Hello Marko,

    thanks for the reply, however, I am not quite convinced. I have a 100% repro rate (= not very rare) and it is only happening with fonts (except for one font per folder). I suspect it has to do with the way that W3 puts the objects in the S3 bucket, probably some batched operation that isn’t 100% supported by S3 – my assumption is it successfully puts the entire batch in the bucket but sets the meta data only on the first object of the batch.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WOFF and WOFF2 Font Missing Cache-Control’ is closed to new replies.