WebPagetest Forums
What's the best way to leverage caching on Magento Enterprise website? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Optimization Discussions (/forumdisplay.php?fid=5)
+--- Thread: What's the best way to leverage caching on Magento Enterprise website? (/showthread.php?tid=13030)



What's the best way to leverage caching on Magento Enterprise website? - oricci - 06-13-2014 04:56 AM

Our website is Megento Enterprise based- e-commerce.
Test result:
http://www.webpagetest.org/performance_optimization.php?test=140612_SD_RQM&run=1&cached=0
I'm working on a request for a developer to specify caching headers/or do it myself if possible/or have server provider assist with this.

In which file caching headers need to be specified?

Per Google recommendations ea. header needs to have Expires or Cache-Control (Expires preferred) and Last-Modified or Etag. Can someone provide an example with both specified with correct syntax?

I'm thinking to set all css and js files to 24 hours to start
Static images- to 30 days
3-rd party widgets - 24 hours?
What about Google Analytics, Google Tag Manager and re-marketing tags- can they be set to over 24 hours?

Thank you for any clarification that can be provided.


RE: What's the best way to leverage caching on Magento Enterprise website? - GreenGecko - 06-16-2014 07:01 AM

You just need to set up your expires headers for static resources:

<ifmodule mod_expires.c>
<Filesmatch "\.(jpg|jpeg|png|gif|js|css|swf|ico|woff|mp3)$">
ExpiresActive on
ExpiresDefault "access plus 30 days"
</Filesmatch>
</ifmodule>

Should be a good starting point.

I'd also look at combining your js ( fixing if necessary ), and using sprites for the logos to get the file count down.

You might also find some improvement in using a cookie free CDN to deliver those files, but that's down to trial and error.

Looks like a well set up server, so I can't go into my usual spiel of swapping over to nginx for improved performance lol.