mod-expires

ETag vs Header Expires

I've looked around but haven't been able to figure out if I should use both an ETag and a Expires Header or one or the other. What I"m trying to do is make sure that my flash files (and other images and what not only get updated when there is a change to those files. I don't want to do anything special like changing the filename or put...

yslow still not giving me an A for expires header in apache httpd even though I added them

Hi, trying to add an ExpiresDefault ExpiresByType to content on my website so that way it is cached. I use cachebusting in the URL (a revision number in the path) for Javascript, CSS, and images so that way I can set it to forever for these mimetypes. I have the following rules set up in apache httpd: ExpiresActive On ExpiresDefault...

Cache Expire Control with Last Modification

In the Apache's mod_expires module, there is the Expires directive with two base time periods: access, and modification ExpiresByType text/html "access plus 30 days" understandably means, the cache will request for fresh content after 30 days. However, ExpiresByType text/html "modification plus 2 hours" doesn't make intuitive sense. ...

Apache FilesMatch - matching a folder in the regular expression

Hi, I'm trying to cache some files using a .htaccess file for Apache2. I want to cache a particular folder longer than anything else, so i've been trying to use the FilesMatch directive like this: <FilesMatch "skins(.*)\.(jpg|png|gif)"> ExpiresDefault A2592000 </FilesMatch> I'm hoping to be able to cache all image files in ...

expires.url configuration for static images in lighttpd

Hi all, I am trying to avoid repeated re-loading of images from my web app. I use lighttpd to serve the static content, and I have expired configured like so: expire.url = ( "/static/" => "access 1 years", "/static/images/" => "access 1 years") This seems to be working for js and css, who live in /static. But this does not really wo...

How to add Expires to Flash and Icon components

Yslow is currently giving Grade B for my site and also for "Add Expires Headers". It says: There is 1 static component without a far-future expiration date. * (no expires) http://localhost/images/favicon.ico The current Expires code in my apache.conf is like this: ExpiresActive On # enable expirations # expire after a wee...

Set-Cookie and Expires headers differ

I'm trying to enable Expires headers for images as recommended by YSlow. I'm sure I had this working before but now when I check YSlow it says they are not being cached. For my .htaccess, I have tried: ExpiresActive on ExpiresDefault A0 <FilesMatch "\.(gif|ico|jpg|png)$"> ExpiresDefault A29030400 Header append Cache-Control "p...

Alternative to mod_expires for setting expiration headers?

I am using php on an Apache server. I am unable to set expiration headers in .htaccess on the server that I am working on, as it is a shared server and they (the web host) will not install the mod_expires module in the apache build. I have always used the "ExpiresActive On" and set the default cache expiration for images, js, xml and tex...

Cakephp and expires_module issue

I am configuring/creating a new web server and have run into an issue that I cannot seem to resolve. I am using Cakephp with Apache2 unfortunately on a Windows environment. When I enable the mod-expires module on our apache instance it causes a delay in the presentation of the new record that was saved before the redirect. It's acting ...

Add Expires Headers for Specific Images

All of the expires headers articles I've looked at give more or less the following solution: ExpiresByType image/gif A2592000 ExpiresByType image/png A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 But it doesn't make sense to me because I know which of my images are going to change and which aren't, so I w...

.htaccess for compression, browser caching, proxy caching, etc.

Can someone provide me with an optimize .htaccess configuration that handles compression, browser caching, proxy caching, etc. for a typical website? Aside from my visitors, I'm also trying to make Google PageSpeed happy. ...

Explanation for expires header

I have a joomla application working on Apache.To improve site performace we have written a .htaccess file to root of the application with setting a far future expires header to all the static content. As desired first time the files load in fresh with 200 status code. when again click on the same link many of the files are served directl...

Apache mod_expires question

Hi Folks, I'm really confused by all that caching stuff. I'm trying to setup mod_expires to reduce the number of HTTP Requests from my website to the server. I did well so far, I installed mod_expires and wrote a little .conf file from the instructions on http://httpd.apache.org/docs/2.0/mod/mod_expires.html. Now, for instance, all my...

Add expires header without mod_expires?

I know that I can add expires header using mod_expires. However, what can I do if the Apache server doesn't have mod_expires installed and I don't want to route the access to the files through a scripting language like PHP? ...