Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Cache-control headers. Confused...

Hi,

Just wondering if anyone has experience with these. I've set up my .htaccess with the following as advised by my hosting provider:

<IfModule mod_expires.c> # Activate mod_expires for this directory ExpiresActive on

# locally cache common image types for 7 days
ExpiresByType image/jpg "access plus 7 days"
ExpiresByType image/jpeg "access plus 7 days"
ExpiresByType image/gif "access plus 7 days"
ExpiresByType image/png "access plus 7 days"

# cache CSS files for 24 hours
ExpiresByType text/css "access plus 24 hours"

</IfModule>

It seems pretty much self explanatory, but when I tested it using one of Googles site optimisation tools it's telling me to optimise caching and therefore can't be picking this up. I'm now wondering if I need the HTML meta tags as well or if I'm actually caching stuff but it's not being reported by the tool. Any thoughts welcome.