Closed
Bug 553283
Opened 14 years ago
Closed 8 years ago
page will not be refreshed if expires header is in the past
Categories
(Core :: Networking: HTTP, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: verkehr, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729) If webserver delivers "expires" and "Cache-Control: max-age" http headers which is in the past, then firefox always will take the page from it's internal cache. No roundtrip to the server (even no "if-modified-since") will be performed. Reproducible: Always Steps to Reproduce: 1. add mod_expires on apache 2. configure mod_expires: 'ExpiresDefault "modification plus 5 minutes" 3. create a "index.html" and "test.html" on apache web server v2.2; index.html contains a link to test.html 4. wait >5 minutes 5. in firefox call http://server/index.html then click on "test.html" ==> expires-header will be in he past 6. edit test.html 7. press "back"-button in firefox, click on "test.html" link ==> test.html always will be fetched from cache, changes on test.html will no be shown IE beheves correctly ;-)
Updated•14 years ago
|
Component: General → Networking: HTTP
QA Contact: general → networking.http
Comment 1•14 years ago
|
||
Odd. The code that handles this sets the expiration time to "right now" if Expires is in the past. See http://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/src/nsHttpResponseHead.cpp#299 Can you point me to a url that shows the problem for you? Are any of your cache preferences set to non-default values?
Comment 2•14 years ago
|
||
(In reply to comment #0) > Steps to Reproduce: > 1. add mod_expires on apache > 2. configure mod_expires: 'ExpiresDefault "modification plus 5 minutes" > 3. create a "index.html" and "test.html" on apache web server v2.2; index.html > contains a link to test.html > 4. wait >5 minutes ExpiresDefault can be superceeded by "ExpiresByType text/html ..." etc. > http://httpd.apache.org/docs/2.0/en/mod/mod_expires.html > Apache Module mod_expires john, did you check such settings other than ExpiresDefault? Firefox 3 has capability to see HTTP headers held in cache. 1. about:cache, Disk cache device, List Cache Entries 2. Find entry of next. Key: http://.../test.html 3. Click linkified "http://.../test.html" at the lising. What is set in expires: field? What HTTP heders are displayed in response-head: field? What value is set in next? (about:config, "frequency" in filter filed) > browser.cache.check_doc_frequency Please read next page for the setting. > http://kb.mozillazine.org/Browser.cache.check_doc_frequency
We first used "ExpiresDefault", after we saw the stange behavior of firefox we tried "ExpiresByType" which doesn't change the behavior. We also tried to divide the expires settings: at "hot times" html pages will be refreshed every 5 minutes, so we tried "ExpiresByType" for html pages "modification plus 5 minutes" and all others (css, js, ...) "ExpiresDefault" plus 1 month. I inspected the http headers with "live http headers" addon. All "expires" and "cache" headers are correctly set by apache! As I mentionted above - IE did it correctly! So I suppose that apache is wrong or our settings (in apache) are wrong. in our browsers browser.cache.check_doc_frequency=3 which is the default setting. We also tried with a freshly installed firefox 3.6 (all settings are at default values). Have you tried my "Steps to Reproduce"?
Comment 4•14 years ago
|
||
john, I tried your steps to reproduce locally (not using Apache, since I don't have that available right this second but using a different web server), and things seem to work fine. If it's at all possible for you to set up a public test server that shows the problem, that would be great. Otherwise I'll keep looking for a way to reproduce...
Updated•8 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•