sitespeedio / chrome-har

Create HAR files from Chrome Debugging Protocol data
MIT License
148 stars 50 forks source link

Adding custom field "_resourceType" #83

Closed starrify closed 2 years ago

starrify commented 3 years ago

Chrome (precisely, its DevTools Frontend) has been including this field in its generated HAR files. It forwards important information from the renderer and may in some cases become rather helpful.

Further information: https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-ResourceType

An example from a Chrome-recorded HAR:

$ cat example_from_chrome.har | jq '.log.entries[]._resourceType' -r | sort | uniq -c
      3 document
      6 fetch
      2 font
     66 image
      2 other
      1 preflight
     26 script
      4 stylesheet
     24 xhr
soulgalore commented 2 years ago

Thank you @starrify I have totally missed this PR, sorry!