S
S
Sergey Valitov2015-08-02 15:48:51
Joomla
Sergey Valitov, 2015-08-02 15:48:51

How to enable browser cache? in joomla?

Hello! Google PageSpeed ​​tells me - Use the Browser Cache
By specifying the expiration date or expiration date of static resources in HTTP headers, the browser will load previously retrieved resources from the local drive instead of the Internet.
How to enable this cache for Apache? How many times did not try to modify htaccess - to no avail. Who can help?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2015-09-03
@ruozaki

Try adding to htaccess:
# BEGIN Compress text files
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
# END Compress text files
# BEGIN Expire headers
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds" ExpiresByType
text/javascript "access plus 216000 seconds"
ExpiresByType application/javascript "access plus 216000 seconds
"
seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
# END Expire headers
# BEGIN Cache-Control Headers
Header set Cache-Control "public"
Header set Cache-Control "public"
Header set Cache-Control "private"
Header set Cache-Control "private, must-revalidate"
Header append Vary:Accept Encoding
Header set Cache-Control "max-age=43200"
Header set Cache-Control "max-age=604800"
Header set Cache-Control "max-age=2592000"
Header unset Cache-Control
# END Cache-Control Headers
# BEGIN Turn ETags Off
FileETag None
# END Turn ETags Off

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question