# CHANGELOG

## 2.0.0 - 2026-11-03
### Breaking
* Node.js 22 or later is required. Node.js 18 and 20 are end of life [#167](https://github.com/sitespeedio/chrome-har/pull/167).

### Added
* Add `harFromMessagesAsync` that takes an async iterable of messages, so you do not need to keep all messages in memory. Thank you [Modeeeeeee](https://github.com/Modeeeeeee) for the idea and first implementation in [#133](https://github.com/sitespeedio/chrome-har/pull/133) [#165](https://github.com/sitespeedio/chrome-har/pull/165).

### Fixed
* Removed the tough-cookie and har-validator dependencies [#159](https://github.com/sitespeedio/chrome-har/pull/159).
* Use the right expiry date for cookies from Chrome. Chrome gives the expiry date in seconds, so cookies were shown to expire in 1970 and session cookies got an expiry date. An expiry date that was not valid also stopped the HAR from being created [#162](https://github.com/sitespeedio/chrome-har/pull/162).
* After a redirect, the final response no longer gets the headers of the redirect response. Requests sent before the first page are no longer added twice, and responses without timing data no longer get a null receive time [#164](https://github.com/sitespeedio/chrome-har/pull/164).
* Use the extra info from Chrome for request and response headers and cookies, also when it comes before the first page (as with Puppeteer). Headers are no longer duplicated with different case, response cookies are parsed from `Set-Cookie` in the extra info, and a 304 from the server no longer removes the headers of the cached response. Thank you [jtung23](https://github.com/jtung23) for the first implementation and the test case in [#111](https://github.com/sitespeedio/chrome-har/pull/111) [#166](https://github.com/sitespeedio/chrome-har/pull/166).
* Stop using the deprecated `url.parse()`, so Node.js 24 and later no longer print a deprecation warning. The URL in the HAR is now exactly the URL that Chrome sent, before some characters like `|` and `{` were escaped [#114](https://github.com/sitespeedio/chrome-har/issues/114) [#168](https://github.com/sitespeedio/chrome-har/pull/168).
* An iframe that Chrome did not report as attached could create an extra page in the HAR, and the requests after it ended up on that page. A frame that we do not know now gets a page only when it loads a document. See [sitespeed.io #4124](https://github.com/sitespeedio/sitespeed.io/issues/4124) [#173](https://github.com/sitespeedio/chrome-har/pull/173).

## 1.3.1 - 2026-05-19
* Fix for render blocking stats [#158](https://github.com/sitespeedio/chrome-har/pull/158).

## 1.3.0 - 2026-05-06
### Added
* Lift CDP `renderBlockingStatus` onto entries as `_renderBlocking` (Chrome 108+) so downstream HAR consumers (waterfall-tools'
WPT-style renderer in particular) can draw the orange ⊗ render-blocking marker. The field is lowercased (`'blocking'` /
`'nonblocking'` / `'inbodyparserblocking'` / `'potentiallyblocking'`); older Chrome builds that don't emit it leave the field
unset, distinguishing "not blocking" from "browser couldn't tell us". [#155](https://github.com/sitespeedio/chrome-har/pull/155).

## 1.2.1 - 2026-04-22
### Fixed
* Make sure not multiple pages are created for a soft nav [#154](https://github.com/sitespeedio/chrome-har/pull/154)

## 1.2.0 - 2026-04-22
### Added
* Support for soft navigation coming from Browsertime [#153](https://github.com/sitespeedio/chrome-har/pull/153)
### Fixed
* Get Charset from response [#152](https://github.com/sitespeedio/chrome-har/pull/152)
* Fix to parse postData [#150](https://github.com/sitespeedio/chrome-har/pull/150)

## 1.1.1 - 2025-10-17
### Fixed
* The option to clean header values was broken, this has been reverted for now.

## 1.1.0 - 2025-10-16
### Added
* Add option to clean header values [#141](https://github.com/sitespeedio/chrome-har/pull/141).

## 1.0.1 - 2024-10-11
### Fixed
* Try/catch broken dates [#130](https://github.com/sitespeedio/chrome-har/pull/130).

## 1.0.0 - 2024-10-08
### Breaking
The project was transitioned to a [pure ESM package](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). This follows along with the changed done in sitespeed.io and Browwsertime. This will make the project easier to maintain [#129](https://github.com/sitespeedio/chrome-har/pull/129).

### Fixed
* Removed dayjs dependency [#128](https://github.com/sitespeedio/chrome-har/pull/128).
* Removed uuid dependency [#127](https://github.com/sitespeedio/chrome-har/pull/127).
* Updated to tough cookie 5.0.0 [#126](https://github.com/sitespeedio/chrome-har/pull/126).

## 0.13.5 - 2024-07-12
### Fixed
* Always take care of Network.responseReceivedExtraInfo even if its fired early, thank you [ifduyue](https://github.com/ifduyue) for PR [#120](https://github.com/sitespeedio/chrome-har/pull/120).

(0.13.4 was never released)

## 0.13.3 - 2024-07-05
### Fixed
*  Include early hints requests, thank you [Ben Schwarz](https://github.com/benschwarz) for PR [#118](https://github.com/sitespeedio/chrome-har/pull/118).


## 0.13.2 - 2023-07-30
### Fixed
* Updated tough-cookie, thank you [lallenlowe](https://github.com/lallenlowe) for PR [#107](https://github.com/sitespeedio/chrome-har/pull/107).

## 0.13.1 - 2023-02-22
### Fixed
* Updated dependencies to latest versions [#105](https://github.com/sitespeedio/chrome-har/pull/105).
* Remove adding headers from extra parameters. Using the CDP Fetch API manipulating responses, the extra response info holds the old un-manipulated headers, so when copying the ones that do not exist, this breaks. Fixed in [#100](https://github.com/sitespeedio/chrome-har/pull/100).

## 0.13.0 - 2022-02-04

### Added
* Add _isLinkPreload on the request object if it is isLinkPreload [#94](https://github.com/sitespeedio/chrome-har/pull/94).

## 0.12.0 - 2020-10-29
## Added
* Addend encoding field to type response, thank you [Miroslav Balaz](https://github.com/miro-balaz) for the PR [#79](https://github.com/sitespeedio/chrome-har/pull/79).
* Include chunk information in the response see [#88](https://github.com/sitespeedio/chrome-har/pull/88).
* Add custom field _resourceType thank you [Peng-Yu Chen](https://github.com/starrify) for PR [#83](https://github.com/sitespeedio/chrome-har/pull/83)
### Fixed
* Use Page.frameRequestedNavigation see [#90](https://github.com/sitespeedio/chrome-har/pull/90).
* Capture redirect before page for traces generated by Lighthouse, thank you [Michael Dijkstra](https://github.com/mikedijkstra) for PR [#89](https://github.com/sitespeedio/chrome-har/pull/89).

## 0.11.12 2020-09-09
### Fixed
* Removed test directory from the release, thank you [Yury Michurin](https://github.com/yurynix) for the PR [#75](https://github.com/sitespeedio/chrome-har/pull/75).

## 0.11.11 2020-08-06
### Fixed
* Fix: Optional cookie object, see PR [73](https://github.com/sitespeedio/chrome-har/pull/73). Thank you [Michael Dijkstra](https://github.com/mikedijkstra).

## 0.11.10 2020-07-29

### Added
* Parse extra info events (parse extra request data from the Network.requestWillBeSentExtraInfo event and parse extra response data from the Network.responseReceivedExtraInfo event), thank you [Michael Dijkstra](https://github.com/mikedijkstra) for the PR [#71](https://github.com/sitespeedio/chrome-har/pull/71).

* Update to day-js 1.8.31.

##  0.11.9 2020-05-26

### Fixed
* Updated dependencies: dayjs - 1.8.27, debug: 4.1.1, tough-cookie - 4.0.0, uuid - 8.0.0

## 0.11.8 (never released)
-------------------------
### Added
* Include iframe request when frame is not attached [#68](https://github.com/sitespeedio/chrome-har/pull/68) - thank you [Michael Dijkstra](https://github.com/mikedijkstra) for the PR!

* Include response canceled by Chrome or user action [#67](https://github.com/sitespeedio/chrome-har/pull/67) - thank you [Michael Dijkstra](https://github.com/mikedijkstra) for the PR!

## 0.11.7 2020-03-09
### Fixed
* And excluded the shrinkwrap file again.

## 0.11.6 2020-03-09
### Fixed
* Exclude the test folder from the release.

## 0.11.5 2020-03-09
### Fixed
* Added a shrinkwrap file.

##  0.11.4 2019-10-16
### Fixed
* Reverted the _initiator field fix since that was an old upstream issue in Chrome [#44](https://github.com/sitespeedio/chrome-har/pull/44).

##  0.11.3 2019-10-14
### Fixed
* Better parsing of the _initiator field fixing an error for some HARs, thank you  [Aleksandr Semyonov](https://github.com/juvirez) for the PR [#44](https://github.com/sitespeedio/chrome-har/pull/44).

##  0.11.2 2019-09-21
### Fixed
* Extra check that we really got a response in the trace [#54](https://github.com/sitespeedio/chrome-har/pull/54)

##  0.11.1 2019-09-14
### Fixed
* Catch if a request misses the response/timings [#53](https://github.com/sitespeedio/chrome-har/pull/53).

## 0.11.0 2019-07-23
### Added
* Include Chrome request id as _requestId to make it simpler in Browsertime to add response bodies  [#50](https://github.com/sitespeedio/chrome-har/pull/50).

## 0.10.0 2019-01-09
### Added
* Support for response bodies, thank you [Michael Cypher](https://github.com/mikeecb) for the PR [#41](https://github.com/sitespeedio/chrome-har/pull/41).

## 0.9.1 2019-01-03
### Fixed
* And also use the URL fragment so we can keep that [#40](https://github.com/sitespeedio/chrome-har/pull/40).

##  0.9.0 2019-01-03
### Added
* Keep hash (#) in URLs. We used to remove them to follow the same path as Chrome but Firefox do not and it breaks later in our tool chain to change the URL [#39](https://github.com/sitespeedio/chrome-har/pull/39).

## 0.8.1 2019-01-03
### Fixed
* Tech: Simplify logic for skipping pages.

## 0.8.0 2019-01-01
### Added
* Skip support for multi page navigation by script (this makes things much easier in Browsertime) [#38](https://github.com/sitespeedio/chrome-har/pull/38).

## 0.7.1 2018-12-13
### Fixed
* Pickup requests/responses that happens before navigation and block some sctript navigations [#36](https://github.com/sitespeedio/chrome-har/pull/36).

## 0.7.0 2018-11-23
### Added
* Catch requestWillBeSent that happens before navigation [#34](https://github.com/sitespeedio/chrome-har/pull/34). This fixes when you click on a link in Chrome that generates a new navigation.

## 0.6.0 2018-11-23
### Added
* Use dayjs instead of moment [#33](https://github.com/sitespeedio/chrome-har/pull/33).
* Support for having a HAR with multiple pages from Browsertime [#30](https://github.com/sitespeedio/chrome-har/pull/30).
* Internal: Split the code to different files to make it easier to read the code [#32](https://github.com/sitespeedio/chrome-har/pull/32).


## 0.5.0 2018-10-12
### Added
* Catch Chrome navigating within page [#28](https://github.com/sitespeedio/chrome-har/pull/28).

## 0.4.1 2018-06-01
### Fixed
* Added extra guard for checking if a response is pushed to fix [sitespeed.io #2068](https://github.com/sitespeedio/sitespeed.io/issues/2068).

## 0.4.0 2018-05-29

### Added
* Including cached entries in the HAR now generates a HAR that validates against the HAR schema.
* Include responses that were pushed with HTTP2. Thanks to Martino Trevisan! [#21](https://github.com/sitespeedio/chrome-har/pull/21)

## 0.3.2 2018-04-07

### Fixed
* Fixes for situations that could result in incorrect HARs (missing startedDateTime or missing first entry).
* Format IPv6 addresses so HARs validate with [har-validator](https://github.com/ahmadnassri/har-validator)

## 0.3.1 2018-03-29

### Fixed
* Also act on Page.frameScheduledNavigation (needed for Chrome 66 and coming Browsertime 3.0)

## 0.3.0 2018-03-15
### Added
* Add more information about request initiator to HAR. Thanks to David Dadon! [#9](https://github.com/sitespeedio/chrome-har/pull/9)

## 0.2.3 2017-10-15

### Fixed
* Prevent creating HAR files with empty pages (i.e. pages with no entries).

## 0.2.2 2017-06-30

### Fixed
* Be extra careful when parsing JSON see [#4](https://github.com/sitespeedio/chrome-har/issues/4)

## 0.2.1 2017-05-31

### Fixed
* Remove unused files from npm distribution.

### 0.2.0 2017-05-31
## Added

* Add "serverIPAddress" field to entries.
* Set bodySize for requests correctly.
* Set bodySize and compression for responses correctly.
* Add _transferSize field for responses, just like Chrome does.

## 0.1.0 2017-03-05
### Added
* Initial release
