Note that there are some explanatory texts on larger screens.

plurals
  1. POCode to make HTTP caching work
    text
    copied!<p>I am reading about HHT caching, found a website article <a href="http://betterexplained.com/articles/how-to-optimize-your-site-with-http-caching/" rel="nofollow">here</a> 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.</p> <p>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.</p> <p>I found this code:</p> <pre><code>ExpiresActive On ExpiresDefault A0 # 1 YEAR - doesn't change often &lt;FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"&gt; ExpiresDefault A29030400 &lt;/FilesMatch&gt; # 1 WEEK - possible to be changed, unlikely &lt;FilesMatch "\.(jpg|jpeg|png|gif|swf)$"&gt; ExpiresDefault A604800 &lt;/FilesMatch&gt; # 3 HOUR - core content, changes quickly &lt;FilesMatch "\.(txt|xml|js|css)$"&gt; ExpiresDefault A10800 &lt;/FilesMatch&gt; </code></pre> <p>But:</p> <ol> <li><p>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?</p></li> <li><p>Is there a code I can put in the sites header, maybe php?</p></li> <li><p>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. <strong>I need a way to specify the exact files which need caching.</strong></p></li> </ol> <p>Please help:)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload