Hi everyone,

This is probably quite silly but I can't for my life find where I set expiration date on .css and .js files that are generated in: /sites/default/files/css

I'm using "boost module" but I don't think this has anything to do with the files that are in the above directory. In fact, there is no setting in "boost" that relates to ".css" and ".js" files. Only .html, .rss, .xml.

I may also add that Google's "PageSpeed" module got my attention to this as it indicates that lack of expiration date is a serious issue. Duh :>

(Url: http://brforesundsdammarna.se)

Kindly,
Mikael
Sweden

Comments

kristofferwiklund’s picture

Hi.

I had the same problem. And it turned out that I was missing a module for apache. I found this site

http://blog.merge.nl/2009/11/08/speeding-up-drupal-performance

Where it talk about it:

Leverage browser caching
You might not see this one pop up in PageSpeed at all if your server is already properly configured. Browsers tend to cache files they downloaded so future requests are pulled of your harddisk instead of the website. This requires your files (images) to provide an expiry date in the HTTP headers so your browser will know when to look for a new version. Drupal already this for you, and sets all expiry dates to two weeks in the future. However this is done in the .htaccess file and requires the mod_expires Apache module. If you get a red flag on this one like in the image above, you probably don't have it running.

So on my server I run
sudo a2enmod expires
sudo services apache2 restart

Now now it works

daniel.stewart’s picture

Thanks for this! It worked like a charm!

manishdrupaldev’s picture

Thanks, it's working now.