On 7/23/07, Bello Martinez Sergio <[EMAIL PROTECTED]> wrote:
Ok, thanks. So, the reason of my error was to suppose that including

   <IfModule mod_expires.c>
               ExpiresActive On
               ExpiresByType text/javascript "access plus 2 minutes"
       </IfModule>

(note that the value '2 minutes' is for testing purposes only) would
apply this header to response even if the return code is 304. That's not
true.

Interesting. If what you say is true, then it's a bug in apache, and
perhaps one that will be very difficult to fix. You should report it
to the bug database. The problem might be that the 304 response
doesn't contain a content-type header and therefore can't be activated
"ByType".

So, the solution I tell you in a previous post, thats including

   <LocationMatch "\.js$">
       Header append Cache-Control "max-age=120"
   </LocationMatch>

makes Apache to include a 'Cache-Control: max-age=120' header in that
response. But this is not enough, because it seems that Firefox doesnt
take into account this header if response code is 304. It set 1970 as
new expiry date no matter the value in this header.

Let's see the original and 304 response headers again under this
config. Do you have a conflicting Expires header? The Cache-Control:
max-age should take precedence, but I wouldn't be surprised if a
user-agent didn't do that correctly, since it would be pretty-rare to
see them conflict.

Also, I suspect that this config would work better:
<LocationMatch "\.js$">
ExpiresActive On
ExpiresDefault "access plus 2 minutes"
</LocationMatch>

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to