You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dr James Smith <js...@sanger.ac.uk> on 2020/02/18 19:19:45 UTC

Re: [users@httpd] Complete list of Expires Headers for WordPress site? [EXT]

Do you embed external resources (like fonts in) these don't tend to have 
the same headers set... I get this with one of my static sites - I have 
13 requests and three are for google fonts (nunito-sans) and these don't 
have decent headers set!

On 18/02/2020 19:00, edflecko . wrote:
> I mention that I'm running a WP site only if that matters. The OS is 
> CentOS 7 and I host the server.
>
> When I test my site with https://tools.pingdom.com [tools.pingdom.com] 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.pingdom.com&d=DwMFaQ&c=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo&r=oH2yp0ge1ecj4oDX0XM7vQ&m=JtSUKrzV7dZ3pk-GSHuUrkBqOg9oU5NS_SOMlCACJgQ&s=RlDxy76xYrSMM-ZfIB_ABHH4RNFrh96vwoo6gonMmRg&e=> 
> , it scores me an 89 in the area of Expires Headers. I'm hoping 
> someone can tell me what else I might want to add, so I have  a 
> "complete" list of Expires Headers?
>
> Here's what I have in my httpd.conf file:
>
> <IfModule mod_expires.c>
> # Enable cache expirations
> ExpiresActive On
> # Default directive
> ExpiresDefault "access plus 1 month"
> # My favicon
> ExpiresByType image/x-icon "access plus 1 year"
> # Media: images, video, audio
>   ExpiresByType image/gif       "access plus 1 month"
>   ExpiresByType image/png       "access plus 1 month"
>   ExpiresByType image/jpg       "access plus 1 month"
>   ExpiresByType image/jpeg      "access plus 1 month"
>   ExpiresByType video/ogg       "access plus 1 month"
>   ExpiresByType audio/ogg       "access plus 1 month"
>   ExpiresByType video/mp4       "access plus 1 month"
>   ExpiresByType video/webm      "access plus 1 month"
> # Webfonts
>   ExpiresByType font/truetype   "access plus 1 year"
>   ExpiresByType font/opentype   "access plus 1 year"
>   ExpiresByType application/x-font-woff "access plus 1 year"
>   ExpiresByType image/svg+xml   "access plus 1 year"
>   ExpiresByType application/vnd.ms-fontobject   "access plus 1 year"
> # CSS and JavaScript
>   ExpiresByType text/css        "access plus 1 year"
>   ExpiresByType application/javascript  "access plus 1 year"
>   ExpiresByType text/javascript "access plus 1 year"
>   ExpiresByType text/x-javascript       "access plus 1 month"
> # Misc. files
>   ExpiresByType application/pdf "access plus 1 month"
>   ExpiresByType application/x-shockwave-flash   "access plus 1 month"
>   ExpiresDefault        "access plus 2 days"
> </IfModule>
> <IfModule mod_headers.c>
>     Header append Cache-Control "public"
> </IfModule>
>
> Thank you,
> Ed



-- 
 The Wellcome Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE.