Answer the question
In order to leave comments, you need to log in
How to fix Add Expires headers in gtmetrix?
Good evening everyone!
The client got into optimization on the site gtmetrix.com We
just can't come up with a solution for this item Add Expires headers
Perhaps someone has come across and can suggest a human solution to this issue?
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
On the hosting, set the storage of the cache of static objects for 365 days
From here :
# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------
# These are pretty far-future expires headers.
# They assume you control versioning with filename-based cache busting
# Additionally, consider that outdated proxies may miscache
# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
# If you don't use filenames to version, lower the CSS and JS to something like
# "access plus 1 week".
<IfModule mod_expires.c>
ExpiresActive on
# Your document html
ExpiresByType text/html "access plus 0 seconds"
# Media: images, video, audio
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# CSS and JavaScript
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
</IfModule>
Perhaps someone came across and can suggest a human solution to this issue?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question