Closed Bug 276631 Opened 20 years ago Closed 20 years ago

Cache-Control: no-cache not honored in same session

Categories

(Core :: Networking: Cache, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 162545

People

(Reporter: mpzzo-mozilla, Assigned: darin.moz)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

Visiting a site which returns http responses which include: Cache-Control:
no-cache in the response of all dynamically generated pages (i.e. not static
files) causes odd behavior.

Browse around this site viewing new pages.

Click browser "Back" button (or "Forward" button if previous back button was
clicked).  The page displayed when going back (or forward) to the previously
displayed page is precisely the originally returned page.  No check is performed
against the site serving the original pages even though the page being displayed
was originally returned with Cache-Control: no-cache HTTP 1.1 response.

Note:  Clicking on the reload button DOES cause the page contents to be
refetched.  This should be the automatic behavior for pages returning the
"Cache-Control: no-cache" http header.

Current versions of Internet Explorer honors these "Cache-Control: no-cache"
HTTP headers and refetches the desired pages each time the page is displayed.

Reproducible: Always



Expected Results:  
The original server should be requeried for non-cached content.
I don't believe that this is a bug in the sense of a 'defect'. People have come
here asking for exactly the reverse - that forward and back buttons should
always and only quickly switch from one view to another.

If you want to query the server you should press reload.

If you (as an author) want to 'force' your users to query the server
on pressing the back-button, you are SOL, force does not work on the
web.

Having said that, you certainly have a case, and if you can show that the
relevant HTTP standard demands that the back-button should not perform
a back operation, but a reload (under certain coherency conditions) then
I don't doubt that this will be implemented; please remember that you
are asking for a useful feature (fast backward-forward movement) to
be removed, and I would be surprised if this were unopposed. 
see also the discussion in bug 139541
Use Cache-Control: no-store, which Firefox supports, if you want to "force"
browsers to not cache for the purpose of session history.  I think this bug,
where the site uses no-cache (not no-store), is invalid.
Assignee: firefox → darin
Component: General → Networking: Cache
Product: Firefox → Core
QA Contact: firefox.general → core.networking.cache
Version: unspecified → Trunk
indeed, this is invalid, although it's a duplicate. HTTP/1.1 allows this behaviour.

see also http://www.mozilla.org/projects/netlib/http/http-caching-faq.html


*** This bug has been marked as a duplicate of 162545 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.