HTTPArchive / custom-metrics

Custom metrics to use with WebPageTest agents
Apache License 2.0
19 stars 21 forks source link

[Cookies Chapter 2024] Use newly exposed WPT_COOKIES in cookies.js #126

Closed yohhaan closed 4 months ago

yohhaan commented 4 months ago

Modification of the custom metric cookies.js to use the newly exposed WPT_COOKIES which allows to directly access all cookies: 1st and 3rd parties, set through JS or HTTP.

This pull request documents the properties we would need for the cookies chapter for the Almanac 2024. See also my comment here on pull request 116


Test websites:

github-actions[bot] commented 4 months ago
Custom metrics for https://almanac.httparchive.org/en/2022/ WPT test run results: http://webpagetest.httparchive.org/results.php?test=240603_YY_D
Custom metrics for https://example.com/ WPT test run results: http://webpagetest.httparchive.org/results.php?test=240603_TJ_E Changed custom metrics values: ```json { "_cookies": [] } ```
Custom metrics for https://web.dev/ WPT test run results: http://webpagetest.httparchive.org/results.php?test=240603_10_F Changed custom metrics values: ```json { "_cookies": [ { "name": "_ga_devsite", "domain": "web.dev", "path": "/", "expires": 1752000013.767326, "size": 38, "httpOnly": false, "secure": false, "session": false, "sameParty": false }, { "name": "cookies_accepted", "domain": "web.dev", "path": "/", "expires": 1751136004, "size": 20, "httpOnly": false, "secure": false, "session": false, "sameParty": false }, { "name": "django_language", "domain": "web.dev", "path": "/", "expires": 1732992004, "size": 17, "httpOnly": false, "secure": false, "session": false, "sameParty": false }, { "name": "_ga_18JR3Q8PJ8", "domain": ".web.dev", "path": "/", "expires": 1752000005.889539, "size": 51, "httpOnly": false, "secure": false, "session": false, "sameParty": false }, { "name": "_ga", "domain": ".web.dev", "path": "/", "expires": 1752000005.890446, "size": 30, "httpOnly": false, "secure": false, "session": false, "sameParty": false } ] } ```
yohhaan commented 4 months ago

Documentation: https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-Cookie

nrllh commented 4 months ago

@nrllh LGTY?

yes, it seems good.