6
I’m doing my site, and I want to try to reach 100/100 in Pagespeed Insights, I’ve activated my cache by. htacces, but the P.S.I says it’s still inactive, so I went to see the headers, and back that up:
HTTP/1.1 200 OK
Date: Thu, 21 Apr 2016 14:54:41 GMT
Server: Apache
X-Powered-By: PHP/5.5.34
Content-Encoding: gzip
Vary: Accept-Encoding
Cache-Control: max-age=0
Expires: Thu, 21 Apr 2016 14:54:41 GMT
Keep-Alive: timeout=2, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
from what I noticed Cache-Control ta max-age=0, I don’t know what to say that’s off or if it’s picking up, I’ve never cached on my sites, and I don’t know anything about it, man. htaccess is like this:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .(/)?$ index.php
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip
ExpiresActive On
ExpiresDefault "access plus 1 month"
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Html
ExpiresByType text/html "access plus 0 seconds"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# Feed
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/atom+xml "access plus 1 hour"
# Favicon
ExpiresByType image/x-icon "access plus 1 week"
# 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"
# HTC files
ExpiresByType text/x-component "access plus 1 month"
# Webfonts
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# CSS / JS
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType application/x-javascript "access plus 1 year"
I really want Cache to be active, but I can’t leave it, I’ve searched about, I’ve changed mine. htaccess, I’ve seen Google video about it, but I can’t understand why it’s still playing offline!
Would it be possible for someone to help me in this matter and, if you could, explain to me about this type of code?
Link to Pagespeed Insight: https://developers.google.com/speed/pagespeed/insights/? url=http%3A%2F%2Fbrowse.netescola.info%2Fp%2Fhardwell
See if this helps http://answall.com/a/120344/3635
– Guilherme Nascimento
@Guilhermenascimento, I read this and re-read it several times, and I did what he says, but the P.S.I Still says it is to support the Browser Cache, Look here https://developers.google.com/speed/pagespeed/insights/? url=http%3A%2F%2Fbrowse.netescola.info%2Fp%2Fhardwell
– Raphael Caldas
Raphael I answered, see if you can understand.
– Guilherme Nascimento