boost cache headers apply to css, js, image files, etc. they should only apply to .html files, or only to the cache folder....
firebus - October 20, 2007 - 07:12
| Project: | Boost |
| Version: | 5.x-1.0 |
| Component: | Apache integration |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
with boost enabled, firefox never caches any images, css, etc. presumably this is the case for any browser that respects the cache-control headers.
i'll try and submit a patch for the apache htaccess changes...

#1
huh. it looks like and it's ilk are not allowed in .htaccess files.
so the solution is to have a separate .htaccess file in the cache directory
i took the following out of the main .htaccess and added it to a new .htaccess in cache:
<IfModule mod_headers.c>Header add Expires "Sun, 19 Nov 1978 05:00:00 GMT"
Header add Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
</IfModule>
#2
I just noticed this today because I checked out my sites headers, and it's troubling that Boost sacrifices client caching for server caching. FWIW, I've installed your patch and my initial observation is that it works well.
#3
Hi,
status changed to critical.
Thanks for pointing this out. We have Boost installed on a multi-site production server and our root .htaccess was edited according to the boost .htaccess rules which was probably affecting all our sites.
The changes work perfectly and the module is running smoothly.
To confirm for other boost users...edit your main .htaccess file in root and remove the following lines
<IfModule mod_headers.c>Header add Expires "Sun, 19 Nov 1978 05:00:00 GMT"
Header add Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
</IfModule>
Create a new .htaccess file and paste the above lines into it. Upload this file to your cache directory.
To see it working, delete some of your old cached files (which will show small file sizes of around 20 bytes before this change) and then call them with a browser as an anonymous user. You will notice the new file created with boost will be much larger in size (now in kB).
Excellent module!
#4
There is some incorrect information in my last post. It appears that images are not being cached. I notice when visiting the site using ie that the browser continues to request image files on each page load.
The notes about checking file sizes to see if files are being cached may not be true as I notice that boost is creating symbolic links for nodes (in the nodes folder cache/domain.org/0/node). So to see if static files are being created follow the symbolic link.
This bug/by design issue is related only to css/image/js files as the title says and not the actual content as I misunderstood.
#5
drupal, by default, doesn't cache text/html type files
# Do not cache dynamically generated pages.ExpiresByType text/html A1
which should apply to boost's cache files as well, unless i'm missing something. can anyone explain why boost bothers with setting separate caching in the first place? i suspect this is a carryover from the 4.x version...
#6
I've seen this problem, too. Thank you, firebus, for posting a solution.
#7
I can't explain why boost does this, but on the site I'm using it I've just removed the lines you suggested (i.e. without moving them to the cache directory) and the site now meets my caching requirements perfectly as far as I can tell.