Bug 186060

Summary: Store 0-lifetime stylesheets / scripts into the disk cache for faster history navigations
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED INVALID    
Severity: Normal CC: cgarcia, commit-queue, ews-watchlist, ggaren, koivisto, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2018-05-29 13:52:47 PDT
Store 0-lifetime stylesheets / scripts into the disk cache for faster history navigations. In particular, on apple.com, several of the scripts / stylesheets currently do not get stored because our current heuristic thinks they are unlikely to be reused.

For e.g.:
Summary
URL: https://www.apple.com/ac/globalfooter/3/en_US/styles/ac-globalfooter.built.css
Status: 200 OK

Request
No request, served from the disk cache.

Response
Date: Tue, 29 May 2018 20:41:41 GMT
Connection: keep-alive
Content-Encoding: gzip
Access-Control-Allow-Origin: https://www.apple.com
Expires: Tue, 29 May 2018 20:41:41 GMT
Cache-Control: max-age=0
Content-Length: 5212
Vary: Accept-Encoding
Content-Type: text/css
Server: Apache
X-Check-Cacheable: YES
X-Serial: 6858
Comment 1 Radar WebKit Bug Importer 2018-05-29 13:53:23 PDT
<rdar://problem/40627270>
Comment 2 Chris Dumez 2018-05-29 13:58:22 PDT
Created attachment 341515 [details]
Patch
Comment 3 Geoffrey Garen 2018-05-29 14:34:46 PDT
Comment on attachment 341515 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=341515&action=review

r=me

> Source/WebKit/ChangeLog:9
> +        Tweak our storeUnconditionallyForHistoryNavigation logic to match resources' whose priority

resources
Comment 4 Chris Dumez 2018-05-29 14:39:33 PDT
Created attachment 341519 [details]
Patch
Comment 5 WebKit Commit Bot 2018-05-29 15:14:09 PDT
Comment on attachment 341519 [details]
Patch

Clearing flags on attachment: 341519

Committed r232275: <https://trac.webkit.org/changeset/232275>
Comment 6 WebKit Commit Bot 2018-05-29 15:14:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Chris Dumez 2018-06-02 16:34:49 PDT
Reverted r232275 for reason:

May have caused a ~1% PLT regression on iOS

Committed r232447: <https://trac.webkit.org/changeset/232447>
Comment 8 Chris Dumez 2018-06-06 12:42:24 PDT
Apparently too costly. I don't have a better idea at the moment.
Comment 9 Antti Koivisto 2018-06-06 12:58:37 PDT
This seems like something the site should fix rather than something we should optimise for.