ExpiresByType

  • 64
Cem added a discussion to , ExpiresByType

Hello UNA team,

I tried with both servers but the browsers are downloading the pictures each time.
For my site the timeline downloads 17 MBs each time thats too much!

Even at una.io most of the images are not browser cached.

with apache the conf is:

mod expires is enabled

ExpiresActive on
ExpiresDefault "access plus 3 seconds"
text/html "access plus 60 minutes"
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpg "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
ExpiresByType image/svg+xml "access plus 1 months"
ExpiresByType text/js "access plus 1 months"
ExpiresByType text/css "access plus 1 months"
ExpiresByType text/woff2 "access plus 1 months"
ExpiresByType application/x-shockwave-flash "access plus 30 days"
ExpiresByType text/javascript "access plus 30 days"
ExpiresByType application/javascript "access plus 30 days"
ExpiresByType application/x-javascript "access plus 30 days"
ExpiresByType application/x-gzip "access plus 30 days"
ExpiresByType image/x-icon "access plus 30 days"
ExpiresByType image/vnd.microsoft.icon "access plus 30 days"
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/font-woff2 "access plus 1 month"
ExpiresByType application/font-sfnt "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"


with nginx the conf is:
 location ~* \.(pdf|jpg|jpeg|gif|css|png|js|ico|svg|woff)$ {
    expires 30d;
 access_log off;
 add_header Cache-Control "public";
  }