I presently make use of this setup during my vhost:

<Location />
  SetOutputFilter DEFLATE
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
  SetEnvIfNoCase Request_URI \
  \.(?:gif|jpe?g|png)$ no-gzip dont-vary
  Header append Vary User-Agent env=!dont-vary
<Directory />
  ExpiresActive On
  ExpiresByType text/html "access plus 5 minutes"
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType application/x-javascript "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
  ExpiresByType text/javascript "access plus 1 month"
  ExpiresByType image/gif "access plus 1 month"
  ExpiresByType image/png "access plus 1 month"
  ExpiresByType image/jpg "access plus 1 month"
  ExpiresByType image/jpeg "access plus 1 month"
  ExpiresByType image/x-icon "access plus 1 month"
  ExpiresDefault "access plus 1 day"

  <FilesMatch "\.(ico|jpeg|pdf|flv|jpg|png|gif|js|css|swf)$">
    Header set Cache-Control "max-age=2592000, public"
    Header unset Last-Modified
    Header unset ETag
    FileETag None
  <FilesMatch "\.(html|php)$">
    Header set Cache-Control "max-age=900, public, must-revalidate"

Although it is effective for accelerating the one thing, sometimes customers dont begin to see the changes they themselfs made on content (mainly while using the Opera) :( any suggestions / optimisation hints?

Rather than forcing the browser to cache, you need to send essential-revalidate header and control the caching from inside your programming language (for instance, PHP) by delivering an Expires and Last-Modified header. The browser will request your website for that latest version on each request, but make certain to reply to by having an empty page if nothing has transformed.

This might take a while to implement, however it certainly works.

The issue here's browser caches your javascript,css and pictures and therefore will not know for those who have modified anything within the server unless of course the cache expires.

For instance, consider you've got a JS file named script.js. Based on the following rules you've inside your htaccess file,

ExpiresByType application/x-javascript "access plus 1 month"  
ExpiresByType application/javascript "access plus 1 month"

the javascript files are cached for any month and therefore no new demands is going to be requested the JS files for 30 days unless of course the cache is by hand removed.

How you can solve this issue.

Presuming your file title is script.js, in HTML file, you need to include is really as

<script src="includes/script.100.js" type="text/javascript"></script>


<link rel="stylesheet" type="text/css" href="includes/style.100.css" />  

100 might be a variety. It's my job to increase if from 1, 2, 3.. and so forth (version number more specifically).

Now, during my htaccess, I've something similar to

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^includes/style\.[\d]+\.css$ /includes/style.css [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^includes/script\.[\d]+\.js$ /includes/script.js [L]

The above mentioned two conditions guarantees the actual file can be used, regardless of what number can be used between your filename and also the filetype.

This guarantees that each time you are making a big change, when you alter the version number, all of your old cache expires and all sorts of the customers begin to see the latest code.

Writing this comment following the reply from Hannes the problem is dependant on content and never in js/css files..

I'd this problem once, but could not nail lower to know what is the problem. I believed the reason might be the HTML page is cached somewhere within the proxy server between me and also the browser.

So, things i did was produced web addresses having a query parameter known as hash, which in fact had something similar to md5(time("U"))

For instance, the url which in fact had exactly the same problem was something similar to


Following this problem, I transformed to ensure that all of the web addresses the consumer clicks is one thing like


Hopefully calculates for you personally. And to be double sure, you could include inside your web site.