WebPagetest Forums
"FAILED - (No max-age or expires)" - for homepage, index page? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: "FAILED - (No max-age or expires)" - for homepage, index page? (/showthread.php?tid=13308)



"FAILED - (No max-age or expires)" - for homepage, index page? - postcd - 10-17-2014 07:55 AM

Hi,

it appears i have all basic webpage elements cached using "Cache-Control max-age"

but webpagetest.org returns only one that is "bad"?

Quote:FAILED - (No max-age or expires) - http://mydomain.com/

Current rules:
Code:
# 1 YEAR
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$" >
Header set Cache-Control "max-age=31536000, public"
</FilesMatch>

# 1 WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf|js|css)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>

# 3 HOUR
<FilesMatch "\.(txt|xml)$">
Header set Cache-Control "max-age=10800"
</FilesMatch>

# 5 MINUTES
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=300"
</FilesMatch>

# NEVER CACHE - notice the extra directives
<FilesMatch "\.(php|cgi|pl)$">
Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"
</FilesMatch>

So which rule i may add to cache that homepage please?


RE: "FAILED - (No max-age or expires)" - for homepage, index page? - pmeenan - 10-24-2014 03:27 AM

You probably don't want to cache the home page. WebPagetest is only checking it because there is no header indicating it shouldn't be cached (pragma: no-cache, etc).

Is the home page an index.html or index.php file? I'm not sure if the FilesMatch directive works for serving the default files (where the file name isn't on the URL).


RE: "FAILED - (No max-age or expires)" - for homepage, index page? - postcd - 10-24-2014 06:27 AM

thx, my pages are all php.. it is a vbulletin forum similar to example http://internetlifeforum.com