Pressflow 6.19.94 & Boost: Browser refresh problem

Events happening in the community are now at Drupal community events on www.drupal.org.
mkalbere's picture

Hi !
I got a pretty ennoying problem, I have boost activated, pages are correctly generated & served.
But when the user comes back, it gets the content from the browser cache instead of the newly generated "boost html file". You have to hit CTRL F5 to get the new content to be loaded.
I modified htaccess (as suggested here: http://drupal.org/node/1074304 & here http://drupal.org/node/1070232

### BOOST START ###
  AddDefaultCharset utf-8
  FileETag MTime Size
  <FilesMatch "(.html|.html.gz|.xml|.xml.gz|.json|.json.gz)$">
    <IfModule mod_headers.c>
      Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
      #Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
    </IfModule>
  </FilesMatch>

but no chance ! http://www.internationalcooperationgeneva.org/ still need the CTRL F5 to be shown with the latest content.

Any suggestion ? Hints ... very very very welcome .. I get crazy with this ;-)
Marc

Comments

mod_headers

firebus's picture

it sounds crazy, but check and make sure mod_headers is enabled.

the idea behind the header directives in the boost .htaccess to to prevent exactly the problem you're experiencing, and lacking mod_headers is one way that could happen.

you can use firebug (or the analogous tool for your preferred browser) to see what headers are being set, and whether or not a particular request is being served from cache.

you may need to clear your browser cache each time you edit .htaccess to make sure you're starting fresh, and don't have old rules saved in a local cache.

you should check the source to make sure that boost is actually working - maybe you're not getting pages from boost after all, and the problem is with .php requests and not .html requests.

good luck!

Hello FireBus ! I'm sure

mkalbere's picture

Hello FireBus !
I'm sure boost is used (I've got the footer comment)
Firefox get :

Date  Wed, 05 Oct 2011 07:17:55 GMT
Server    Apache/2.2.20 (Unix) mod_ssl/2.2.20 OpenSSL/0.9.8e-fips-rhel5 mod_fcgid/2.3.6 Phusion_Passenger/2.2.15 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Last-Modified    Wed, 05 Oct 2011 07:17:48 GMT
Etag  "2080-4ae8801555f00"
Accept-Ranges    bytes
Content-Length    8320
Cache-Control  max-age=1209600
Expires Sun, 19 Nov 1978 05:00:00 GMT
Keep-Alive    timeout=10, max=498
Connection  Keep-Alive
Content-Type text/html; charset=utf-8
Content-Encoding   gzip

... They seem ok for me ..
++
Marc

I think I found out the

mkalbere's picture

I think I found out the problem.
My previous htaccess gave me a

Last Modified Wed Oct 05 2011 15:40:30 GMT+0200 (CEST)
Last Fetched   Wed Oct 05 2011 15:40:32 GMT+0200 (CEST)
Expires    Wed Oct 19 2011 15:38:18 GMT+0200 (CEST)

it seems that "Header set Expires" is not adequat, max-age needs also to be specified :

  AddDefaultCharset utf-8
  FileETag MTime Size
  <FilesMatch "(.html|.html.gz|.xml|.xml.gz|.json|.json.gz)$">
    <IfModule mod_headers.c>
      Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
      Header set Cache-Control "max-age=0, no-store, no-cache"
    </IfModule>
  </FilesMatch>
   <FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf)$">
    <IfModule mod_headers.c>
      Header set Cache-Control "max-age=2592000"
    </IfModule>
   </FilesMatch>
  <FilesMatch ".(js|css|pdf|txt)$">
    <IfModule mod_headers.c>
      Header set Cache-Control "max-age=604800"
    </IfModule>
   </FilesMatch>

now give me :
Last Modified Wed Oct 05 2011 16:03:16 GMT+0200 (CEST)
Last Fetched   Wed Oct 05 2011 16:03:17 GMT+0200 (CEST)
Expires    Thu Jan 01 1970 01:00:00 GMT+0100 (CET)