RESOLVED FIXED 207418
Resource Load Statistics: Hold off non-cookie website data deletion until an hour after user interaction
https://bugs.webkit.org/show_bug.cgi?id=207418
Summary Resource Load Statistics: Hold off non-cookie website data deletion until an ...
John Wilander
Reported 2020-02-07 16:30:39 PST
We should wait with non-cookie website data deletion for cases where there's no previous statistics data such as after a reset.
Attachments
Patch (5.31 KB, patch)
2020-02-07 16:37 PST, John Wilander
no flags
Patch (5.29 KB, patch)
2020-02-07 16:48 PST, John Wilander
no flags
John Wilander
Comment 1 2020-02-07 16:30:52 PST
John Wilander
Comment 2 2020-02-07 16:37:28 PST
Chris Dumez
Comment 3 2020-02-07 16:41:06 PST
Comment on attachment 390146 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390146&action=review > Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:2283 > + // remove non-cookie website data. I think this comment could have been on one line.
John Wilander
Comment 4 2020-02-07 16:45:15 PST
(In reply to Chris Dumez from comment #3) > Comment on attachment 390146 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=390146&action=review > > > Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:2283 > > + // remove non-cookie website data. > > I think this comment could have been on one line. Will fix. Thanks!
John Wilander
Comment 5 2020-02-07 16:48:21 PST
John Wilander
Comment 6 2020-02-07 16:48:48 PST
Comment on attachment 390147 [details] Patch Waiting for EWS feedback before landing.
John Wilander
Comment 7 2020-02-08 07:03:58 PST
The related test failure on the iOS bot is an output ordering text diff. The actual result doesn’t differ: https://ews-build.webkit.org/results/iOS-13-Simulator-WK2-Tests-EWS/r390147-10350/http/tests/resourceLoadStatistics/log-cross-site-load-with-link-decoration-pretty-diff.html We already have ongoing work to address flakiness in that test.
WebKit Commit Bot
Comment 8 2020-02-08 07:48:59 PST
Comment on attachment 390147 [details] Patch Clearing flags on attachment: 390147 Committed r256090: <https://trac.webkit.org/changeset/256090>
WebKit Commit Bot
Comment 9 2020-02-08 07:49:00 PST
All reviewed patches have been landed. Closing bug.
Antoine Bourlon
Comment 10 2020-02-09 17:07:09 PST
Looking at the code and explanations, this doesn't seem to change the immediate deletion of non-cookie data on sites without previous user interaction, after a browser restart or right after the periodic (hourly) data removal. Is this intended behavior? Steps to reproduce here: https://github.com/cookie-status/cookie-status-dev/issues/9#issuecomment-567076418
John Wilander
Comment 11 2020-02-09 17:44:32 PST
(In reply to Antoine Bourlon from comment #10) > Looking at the code and explanations, this doesn't seem to change the > immediate deletion of non-cookie data on sites without previous user > interaction, after a browser restart or right after the periodic (hourly) > data removal. > Is this intended behavior? > > Steps to reproduce here: > https://github.com/cookie-status/cookie-status-dev/issues/9#issuecomment- > 567076418 As long as the user has interacted with some website at least an hour ago, sites without user interaction the last seven days of use will have their non-cookie website data deleted. That is the intended behavior. Are you seeing something else?
Antoine Bourlon
Comment 12 2020-02-09 20:40:19 PST
OK that is what I am seeing. Noted that "0 days for sites without interaction" is the (commonly misunderstood?) intended behavior. By the way "cases where there's no previous statistics" seem pretty rare in real life. ITP will usually start classifying domains after some user interaction, unless the user accesses multiple sites directly from the address bar/bookmarks, without clicking anything. Testing the "data removal after navigation with link decoration from a classified domain" is especially tricky without interacting with a classified domain :) Anyway, thanks for the clarification!
John Wilander
Comment 13 2020-02-09 21:07:15 PST
(In reply to Antoine Bourlon from comment #12) > OK that is what I am seeing. > Noted that "0 days for sites without interaction" is the (commonly > misunderstood?) intended behavior. > > By the way "cases where there's no previous statistics" seem pretty rare in > real life. ITP will usually start classifying domains after some user > interaction, unless the user accesses multiple sites directly from the > address bar/bookmarks, without clicking anything. Testing the "data removal > after navigation with link decoration from a classified domain" is > especially tricky without interacting with a classified domain :) > > Anyway, thanks for the clarification! Rare, absolutely. This patch was a refinement for the few cases where it happens such as new device, user clears history, new account on macOS, user has run with ITP off and turns it on for the first time, user installs Safari Technology Preview and runs it …
Note You need to log in before you can comment on or make changes to this bug.