Closed
Bug 168089
Opened 23 years ago
Closed 22 years ago
No need to IMS cached redirect [was: Redirect (302) with Cache-Control: no-cache is cached.]
Categories
(Core :: Networking: HTTP, defect, P5)
Tracking
()
Future
People
(Reporter: matt, Assigned: darin.moz)
Details
(Keywords: testcase)
Attachments
(2 files)
I am sending a redirect and setting the Cache-control header to no-cache, but
Mozilla 1.1 still seems to be caching it in its disk cache.
When I go back to that url, mozilla is sending an 'if-modified-since' request,
but because I instructed it not to cache the redirected url, it seems like it
should just do a normal GET with 'If-modified-since'.
Note that I tried the same thing in IE and had no problems.
My about:cache display shows that the url is cached:
key: http://www.fairoaksgazette.com/sports/base/30.html
fetch count: 18
last fetched: 09/11/02 17:12:29
last modified: 09/11/02 17:01:27
expires: 12/31/69 16:00:00
Data size: 0
Security: This document does not have any security info associated with it.
Client:HTTP
request-method:GET
response-head:
HTTP/1.1 302 Moved Temporarily
Last-Modified: Tue, 27 Aug 2002 23:44:27 GMT
Cache-Control: no-cache
Location: http://www.fairoaksgazette.com/s?action=login
Content-Type: text/html
Date: Thu, 12 Sep 2002 00:01:27 GMT
Server: Apache Coyote/1.0
Additional note: Cache-control: no-store seems to give the proper behavior,
although the url does turn up in the memory cache about pages.
Summary: Redirect (302) with Cache-Contro: no-cache is cached. → Redirect (302) with Cache-Control: no-cache is cached.
![]() |
||
Comment 2•23 years ago
|
||
The no-store behavior is perfectly correct. The problem is that we send the
If-Modified-Since header, right?
Component: Browser-General → Networking
-> cache
Assignee: new-network-bugs → gordon
Component: Networking → Networking: Cache
QA Contact: benc → tever
Yes the problem is that the If-modified-since header is sent after no-cache has
been set.
Comment 6•23 years ago
|
||
Darin, hit this twice. (internal only but I will attach it)
http://10.169.103.61/scripts/nph-302redir_nocache.pl
Assignee: gordon → darin
Keywords: testcase
Updated•23 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 7•23 years ago
|
||
Comment 8•23 years ago
|
||
is this related to or a dupe of bug# 89419 - has to do with images, 302, cache?
Assignee | ||
Comment 9•23 years ago
|
||
we cache the 302 redirect for offline browsing. when online, the server will
always be queried to check if the location header has changed. granted, there's
little point to issuing an IMS request, but it is also wierd that the server
issues a Last-Modified response header. according to the spec, it is completely
valid to issue an IMS request here. the server can easily ignore the IMS
header. of course, if it is causing sites to break, then we can easily send a
non-IMS request.
Severity: normal → trivial
Status: NEW → ASSIGNED
Priority: -- → P5
Summary: Redirect (302) with Cache-Control: no-cache is cached. → No need to IMS cached redirect [was: Redirect (302) with Cache-Control: no-cache is cached.]
Target Milestone: --- → Future
Comment 10•22 years ago
|
||
302 responses are cached using the final requests cache settings.
Scenario:
HTML with image tag pointing to redirect url.
Redirect url issues "Cache-Control: no-cache"
Redirects to image file.
Image file issues "Cache-Control: max-age=52067566"
The redirect url will not be requested again. This is bad as in our setup, the
redirect url is the same, but the url that is being redirected to is different
each time. I have attached a log of the HTTP headers being sent for 4 requests
to my test script. As you can see, it requests test.php, which simply has an
image tag in it, then redirect.php and then file.php?1052949052, which has a
random timestamp added by redirect.php to show the example. After that first
request to test.php, redirect.php is never requested again. If I remove the
cache headers from file.php, redirect and file.php are requested on every
reload as you would expect.
Comment 11•22 years ago
|
||
*** This bug has been marked as a duplicate of 89419 ***
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•