Could we add "pageref" in har entry from devtools.network.onRequestFinished
Categories
(DevTools :: Netmonitor, enhancement)
Tracking
(Not tracked)
People
(Reporter: lijingmu, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0
Steps to reproduce:
I use browser.devtools.network.onRequestFinished
to preserve har entries and finally parse them to HAR file. It is difficult to find page reference. I have tried to use request.headers.Referer
, but it can be changed by users by Referrer-Policy
through HTML or headers. I also tried to use window.performance.timeOrigin
when the har entry generated, but it is not accurate.
I would like to ask is it possible to add "pageref": "page_1",
in har entry to make it easier ? Or any suggestions?
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Netmonitor' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
actually it is in HAR 1.2 Spec http://www.softwareishard.com/blog/har-12-spec/#entries and also can be found in chrome.devtools.network.onRequestFinished.addListener(function (entry)
Har entry from Chromium
"entries": [
{
"pageref": "page_0",
"startedDateTime": "2009-04-16T12:07:23.596Z",
"time": 50,
"request": {...},
"response": {...},
"cache": {...},
"timings": {},
"serverIPAddress": "10.0.0.1",
"connection": "52492",
"comment": ""
}
]
Description
•