B
B
BoriHagen2021-03-03 00:23:21
htaccess
BoriHagen, 2021-03-03 00:23:21

Why doesn't the file cache time change?

There is a server on Apache. The htaccess directive is written:


# Add correct content-type for fonts
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font- woff .woff
AddType application/x-font-woff .woff2
AddType image/svg+xml .svg

ExpiresActive on

# Add a far future Expires header for fonts
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType application/x -font-ttf "access plus 1 year"
ExpiresByType application/x-font-opentype "access plus 1 year"
ExpiresByType application/x-font-woff "
ExpiresByType image/svg+xml "access plus 1 year" #cache

flash and images for a month
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year "
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType application/x-shockwave-flash "access plus 1 year" #cache
css, javascript and text files for a year
ExpiresByType text/css " access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType application/x-javascript "access plus 1 year" #cache
html and htm files for one day
ExpiresByType text/html "access plus 43200 seconds" #cache
xml files for ten minutes
ExpiresByType application/xhtml+xml "access plus 600 seconds" #default

cache is 5 seconds
ExpiresDefault "access plus 5 seconds"


But google speed test says that images are cached for 30 days:

603eacc2eaa11794982463.jpeg

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question