Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Apache Header Cache Control
Total Posts:  60
Joined:  2009-12-03

Last week I was optimizing my configuration of Apache to decrease the page load times of my sites.  I thought Header Cache Control in Apache would be useful to help speed things up so I tried the following in my httpd.conf file:

<IfModule mod_cache.c>
CacheDisable "/index.php/admin"
CacheDisable "/admin"
CacheDisable "/index.php/checkout"
CacheDisable "index.php/customer"
CacheDisable "/index.php/contacts"
CacheDisable "/index.php/wishlist"
<IfModule mod_disk_cache.c>
CacheDefaultExpire 3600
         CacheEnable disk 
CacheRoot "/var/cache/apache/"
CacheDirLevels 5
         CacheDirLength 1
        CacheLock on
        CacheLockMaxAge 5         
        CacheMaxFileSize 1000000
         CacheMinFileSize 1
         CacheIgnoreCacheControl Off
         CacheIgnoreNoLastMod On
         CacheIgnoreQueryString Off
         CacheIgnoreHeaders None
         CacheLastModifiedFactor 0.1
         CacheDefaultExpire 3600
         CacheMaxExpire 86400
         CacheStoreNoStore Off
         CacheStorePrivate On
IfModule mod_headers.c>
ExpiresActive On
unset Pragma
         FileETag None
unset ETag
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$">
Header set Cache-Control "public, no-transform"
Header set Expires A1209600
unset Last-Modified
ExpiresByType text/css "now plus 1 month"
ExpiresByType application/x-javascript "now plus 1 month"
<IfModule mod_cache.c>

The front end was loading in less than .5 seconds!  Unfortunately, the Admin panel was also being cached in the browser, rendering it pretty much useless.  I ended up having to take all of the Header Cache Control out, clear my browser cache and restart the server to get the Admin Panel back to normal.  Has anyone been successful at implementing Apache Header Cache Control without it impacting the Admin Panel?

Magento Community Magento Community
Magento Community
Magento Community
Jr. Member
Total Posts:  4
Joined:  2010-07-06

Hey did you get anywhere with this? im experimenting with it at the moment

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top