Spring 2017 Update: Some of these issues have been fixed.
The HTTP Archive Format (HAR) was designed to allow tools to exchange network traffic using a standard format; this format is akin to Fiddler’s Session Archive Zip format but is supported natively by browser developer tools. Unlike SAZ files, it is not compressed by default, and often includes redundant text to simplify parsers.
Unfortunately, none of the four major browsers (IE, Edge, Chrome, Firefox) generates HAR correctly.
Internet Explorer 11 and below: Generates the file in XML instead of the proper JSON, due to a misreading of the specification. The export is also limited by numerous bugs in the F12 Network Capture tool, including missing data and misrepresentation of certain response types (e.g. 304s).
Firefox 45: Attempts to store GZIP’d response bodies as text.
Microsoft Edge: Fails to include the encoding=base64 token when storing binary bodies using base64 encoding.
Chrome 47: “Save as HAR with content” doesn’t save the content.
Unfortunately, there seems to be little effort to clean these problems up; the IE bug is at least four years old, the Edge bug is at least four months old. I filed bugs on Chrome and Firefox after failing to find any duplicates.
The HAR format specification itself has a number of shortcomings that have yet to be corrected, for instance:
- No specified way to encode binary request bodies
- No specified way to encode WebSocket messages
Perhaps the name of HAR spec-author Jan Odvarko’s blog is prescient: Software is hard.