Convert a HAR to a summary of a page, describing what's important of a web page in a performance perspective to a page. This is a part of the coming sitespeed.io 4.0 but you can use it standalone.
What do we collect?
- The size and the number of requests per content type
- The size and requests per domain
- The number of requests per response code
- The base domain and the httpVersion used for the base asset (the main HTML document)
- All assets (responses) with the following data: type, url, size, expires (a normalized expires convering max-age/expires to just expires in seconds), status (response code), timeSinceLastModified (using the last modified field in the reponse header and normalizing to seconds), httpVersion and all request and response headers.
npm install snufkin -g
Or if you want to prettify the HAR
snufkin --pretty /path/to/my.har
And if you want to get info per request/response:
snufkin -includeAssets /path/to/my.har
If you want to use it in node, use it like this:
let snufkin= require('snufkin');let har = // your HARlet pages = snufkin.convert(har);
All sizes are in bytes. Expires and timeSinceLastModified are in seconds.