WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
CLOSED INVALID
13309
[S60] BrowserCache not calculating current Age correctly
https://bugs.webkit.org/show_bug.cgi?id=13309
Summary
[S60] BrowserCache not calculating current Age correctly
Anand Patil
Reported
2007-04-09 04:06:21 PDT
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.
Attachments
More information is in the attached 'browser_cache_age_calc_error.doc'.
(60.00 KB, application/octet-stream)
2007-04-09 04:09 PDT
,
Anand Patil
no flags
Details
Fix for HTTP cache Age calculation
(764 bytes, patch)
2007-04-09 04:10 PDT
,
Anand Patil
Sachin.Padma
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Anand Patil
Comment 1
2007-04-09 04:09:21 PDT
Created
attachment 13990
[details]
More information is in the attached 'browser_cache_age_calc_error.doc'.
Anand Patil
Comment 2
2007-04-09 04:10:28 PDT
Created
attachment 13991
[details]
Fix for HTTP cache Age calculation
Sachin Padma
Comment 3
2007-04-09 08:00:15 PDT
Comment on
attachment 13991
[details]
Fix for HTTP cache Age calculation This would cause the request time to be the time when resource is requested from cache everytime and not when it was actually first requested
Robert Blaut
Comment 4
2008-06-11 00:24:07 PDT
I think the S60 platform bug should be closed as other S60 bugs.
Joel Parks
Comment 5
2011-03-21 11:53:22 PDT
re-purposing InTSW keyword for use by QtWebkit team
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug