I am reading about HHT caching, found a website article here which explains some things but I still don't get it since I am a total newb and its the first time I have heard of this.
First of all, using firebug I have noticed that I have some elements which rarely change like: 1. sites logo; 2. sites css; 3. sites jquery; 4. about 4 images which are used for styling.
I found this code:
ExpiresActive On
ExpiresDefault A0
# 1 YEAR - doesn't change often
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
ExpiresDefault A29030400
</FilesMatch>
# 1 WEEK - possible to be changed, unlikely
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
ExpiresDefault A604800
</FilesMatch>
# 3 HOUR - core content, changes quickly
<FilesMatch "\.(txt|xml|js|css)$">
ExpiresDefault A10800
</FilesMatch>
But:
I don't know where to put it. I'm not sure I can modify my htaccess because I have wordpress which rewrites everything. Where does this code go?
Is there a code I can put in the sites header, maybe php?
While I have css, js, jpg elements that do not change, I have others that do change, sometimes every 5 minutes because of a cronjob. The code above dictates the files by gender. I need a way to specify the exact files which need caching.
Please help:)