[Webkit-unassigned] [Bug 13309] New: BrowserCache not calculating current Age correctly
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 9 04:06:22 PDT 2007
http://bugs.webkit.org/show_bug.cgi?id=13309
Summary: BrowserCache not calculating current Age correctly
Product: WebKit
Version: 522+ (nightly)
Platform: PC
URL: http://www.barnesandnoble.com
OS/Version: S60 3rd edition
Status: UNCONFIRMED
Severity: Major
Priority: P4
Component: WebKit Misc.
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: anand.1.patil at nokia.com
More information is in the attached 'browser_cache_age_calc_error.doc'.
- Use case:
Cache is empty. Download a webpage. Stale HTTP::Date response headers cause the
objects to be revalidated when it need not be.
- Steps to reproduce:
- Actual outcome:
RFC 2616, Section 13.2.3 Age Calculation defines the following algorithm and
variables for currentAge calculations. Not that the request_time and
response_time are locally computed values when the item is cached.
/*
* age_value
* is the value of Age: header received by the cache with
* this response.
* date_value
* is the value of the origin server's Date: header
* request_time
* is the (local) time when the cache made the request
* that resulted in this cached response
* response_time
* is the (local) time when the cache received the
* response
* now
* is the current (local) time
*/
apparent_age = max(0, response_time - date_value);
corrected_received_age = max(apparent_age, age_value);
response_delay = response_time - request_time;
corrected_initial_age = corrected_received_age + response_delay;
resident_time = now - response_time;
current_age = corrected_initial_age + resident_time;
A problem is that the request_time and response_time variables must be locally
computed and not be the values received in the HTTP::Date header. By using the
HTTP::Date header values, it causes the above resident_time variable to be
extremely large and causing the current_age to exceed the Cache-Control:
max-age header value.
The BrowserCache is incorrectly relying on the HTTP response header HTTP::Date
field in order to calculate the value of the below mentioned request_time and
response_time. Those variables need to be locally computed as described in
RFC 2616, section 13.2.3.
This causes a revalidation and the HTTP request has to be sent over the wire
again. This can cause a performance drop in page load times.
- Expected outcome:
The BrowserCache is incorrectly relying on the HTTP response header HTTP::Date
field in order to calculate the value of the request_time and
response_time. Those variables need to be locally computed as described in
RFC 2616, section 13.2.3.
This should result in no need to revalidate the cached object.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list