'Cache-Control: must-revalidate' header not working through javascript window

RESOLVED INVALID

Status

()

RESOLVED INVALID
15 years ago
15 years ago

People

(Reporter: byron, Assigned: darin.moz)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031016
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031016

Mozilla does not revalidate an image file when the header 'Cache-Control:
must-revalidate' is specified in the response the first time the image is
requested from the server,  and the image is viewed in a javascript window. 
After the initial download of the image Mozilla makes no request at all on
subsequent calls through javascript for the given image.

Reproducible: Always

Steps to Reproduce:
1.  Make an image request to a server responding with 'Cache-Control:
must-revalidate' in the response header with the following javascript.

      var w = window.open("someimage.gif,"","");

      The first time the image will be correctly downloaded.

2.   Run the same javascript again.


Actual Results:  
The browser does not make another request for the image but instead displays the
cached version.

Expected Results:  
Mozilla should make a request for the image with "if-modified-since" or/and
"if-none-match" in the request header. 

Given the above conditions but making the image request in the browser's main
window (typing the image URL in the url bar) works as expected.

Comment 1

15 years ago
Reporter, can you provide a test URL ?

According to bug 94121 and bug 112564 it should work. It should be revalidated
when it becomes stale (expires), regardless of your cache-options. But I think
that the key point is the expiration. If your image contains an expiration-date
in the future, it won't be revalidated every time you try to display the image.
The 'must-revalidate' just prevents the browser and/or cache to enforce its own
options (like 'validate never'). See RFC2616, section 14.9.4
.
Assignee: general → darin
Component: Browser-General → Networking: HTTP
QA Contact: general → httpqa
Note that having no expiration date header is equivalent to a expiration in the
future (1/10 of the time since last-modified, in fact).
(Reporter)

Comment 4

15 years ago
You are correct,  I misunderstood the specs for must-revalidate.  After adding
max-age=0 I got the behavior I desired.  Sorry for the false alarm.
.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.