Hi!

We are currently facing some problems related with browser cache.  The browsers 
(Opera, Firefox and Chrome; Windows 11) are not showing the right content of a 
web application. We are making some tests switching between the old static 
files (html, css, js) of the project and the new files, but the problem 
persists.


By the time we have tried changing some settings in the httpd.conf file. The 
first option we tried was to add the following settings to mod_rewrite

<IfModule mod_rewrite.c>
   #Initialize mod_rewrite
   RewriteEngine On
   <FilesMatch "\.(html|htm|js|css)$">
     FileETag None
     <IfModule mod_headers.c>
       Header unset ETag
       Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
       Header set Pragma "no-cache"
       Header set Expires "Wed, 12 Jan 1980 05:00:00 GMT"
     </IfModule>
   </FilesMatch>
    <FilesMatch "\.(js|min\.js|min\.css|gif|html|jpg|json|png|svg|woff|woff2)$">
    RequestHeader unset If-Modified-Since
    RequestHeader unset If-None-Match
   </FilesMatch>
</IfModule>


Then we tried with the mod_expires tag with the following setting

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/png "access plus 3 seconds"
    ExpiresByType image/gif "access plus 3 seconds"
    ExpiresByType image/jpeg "access plus 3 seconds"
    ExpiresByType text/javascript "access plus 3 seconds"
    ExpiresByType text/css "access plus 3 seconds"
    ExpiresByType text/html "access plus 3 seconds"
    ExpiresDefault "access plus 3 seconds"
</IfModule>


The problem here is that we are not having a consistent behavior across 
settings. For example, in some tests with one configuration, the web browsers 
are showing the right website instantly, then, after changing the static files 
with the exact same configuration, the web browsers show a wrong version.


Is there some aditional settings to be set o there is something else are we 
missing?

Reply via email to