Creating and reading a browser HAR Capture

A HAR (HTTP Archive) file is a JSON-formatted log. It includes details about network requests, responses, and can be used for performance analysis and troubleshooting.

Creating a HAR file

The process to create a HAR file varies by browser.  The following instructions are guidelines.

Important:

HAR files contain sensitive information. Before sending a HAR file to anyone, always sanitize it first. Sanitizing removes information such as API keys, secrets, cookie values, personal data, and passwords. There are multiple sanitation tools available. Tanium recommends using https://har-sanitizer.pages.dev/ to sanitize your HAR files.

Google Chrome

  1. Open Chrome and navigate to the page you want to analyze.

  2. Right-click anywhere on the page and select Inspect.

  3. Navigate to the Network tab.

  4. Ensure that the tool is recording. There is a round icon at the top left of the page.

    1. If it is red, the tool is recording.

    2. If it is gray, the tool is not recording. Click to start recording.

  5. Enable Preserve log.

  6. Perform a function or reload the page. The Network window populates with network data.

  7. Click the download icon to download the HAR file or right-click on any entry in the network log and select Save All as HAR with content.

For more information, see Inspect network activity in the Chrome for Developers documentation.

Mozilla Firefox

  1. Open Firefox and navigate to the page you want to analyze.

  2. Right-click anywhere on the page and select Inspect.

  3. Select the Network tab.

  4. Ensure that the tool is recording. There is either a pause or play icon in the tool bar.

    1. If it is a pause icon, the tool is recording.

    2. If it is a play icon, the tool is not recording. Click to start recording.

  5. Click the gear icon and select Persist Logs.

  6. Perform a function or reload the page. The Network window populates with network data.

  7. Click the Settings icon and select Save All As HAR or right-click on any entry in the network log and select Save All as HAR.

For more information, see Network Monitor in Firefox DevTools User Docs.

Microsoft Edge

  1. Open Edge and navigate to the page you want to analyze.

  2. Right-click anywhere on the page and select Inspect.

  3. Navigate to the Network tab.

  4. Ensure that the tool is recording. There is a round icon at the top left of the page.

    1. If it is red, the tool is recording.

    2. If it is gray, the tool is not recording. Click to start recording.

  5. Enable Preserve log.

  6. Perform a function or reload the page. The Network window populates with network data.

  7. Click the download icon to export the HAR or right-click on any entry in the network log and select Save All as HAR with content.

For more information, see Microsoft Edge Network features reference.

Safari

  1. Open Safari and navigate to the page you want to analyze.

  2. Right-click anywhere on the page and select Inspect.

  3. Navigate to the Network tab

  4. Enable Preserve log (click button next to the All up/down button)

  5. Perform a function or reload the page. The network window populates with network data.

  6. Click the Export button on the top right side of the panel to save the HAR file.

Reading a HAR file

There are several online tools available to visualize and analyze HAR files. The browsers referenced above have built-in support for importing and analyzing HAR files.

Google Chrome

  1. Open any page in Google Chrome.

  2. Right-click anywhere on the page and select Inspect.

  3. Navigate to the Network tab.

  4. Click the import icon.

  5. Navigate to and select the HAR file you want to read.

    Note: You can use Google Admin Toolbox HAR Analyzer to examine the HAR file.

Mozilla Firefox

  1. Open any page in Mozilla Firefox

  2. Right-click anywhere on the page and select Inspect.

  3. Select the Network tab.

  4. Click the gear icon and select Import HAR File.

For more information, see Network Monitor in Firefox DevTools User Docs.

Microsoft Edge

  1. Open any page in Microsoft Edge

  2. Right-click anywhere on the page and select Inspect.

  3. Click the Network tab.

  4. At the top of the Network tab, click the Import icon.

  5. Navigate to and select the HAR file you want to read.

  6. The HAR file is loaded into the Network tab.

For more information, see Microsoft Edge Network features reference.

You can also reference Microsoft Overview of Dev Tools.

Safari

  1. Open Safari and open a new blank tab.

  2. Right-click anywhere on the page and select Inspect.

  3. Navigate to the Network tab

  4. Click the Import button on the top right side of the panel to open the HAR file.