Abstract
This article provides information on what a HAR file is and how to generate one. It covers Google Chrome, Microsoft Edge, and Mozilla Firefox (to get a HAR file for Mobile Application with a webview, see this article).
What is a HAR File?
A HAR (HTTP Archive) file is a log of all network requests made by a web page in your web browser. It includes details about each request, such as the URL, response headers, request headers, and timings.
A HAR file is a useful troubleshooting tool because it provides a comprehensive snapshot of a web page's network activity, allowing for precise issue identification.
How to generate a HAR File
Chrome and Edge
Step 1: Open Developer Tools
Open Developer Tools using one of the options below:
- Open the Browser and press F12 on your keyboard, or
- Right-click anywhere on the page and select "Inspect" or "Inspect Element", or
- On Chrome, you can also use the three-dot menu in the top-right corner of the browser > More tools > Developer tools.
Step 2: Enable log preservation
- In Developer Tools, click on the "Network" tab.
- Ensure the "Preserve log" checkbox is checked.
This option keeps the network log intact even after a page refresh or navigation.
- Optionally, you can clear the network log by clicking the "Clear" button. ∅
Chrome and Edge:

Step 3: Allow sensitive data to be captured in the HAR file
In order for cookies to be included in the HAR file, the 'Allow to generate HAR with sensitive data' must be enabled.
- Open Settings
- In Chrome Developer Tools, click on cog on the top nav bar

- In Edge Developer Tools, click on the 3 dots in the top right of the nav bar and then select Settings

- Select the Preferences tab
- Scroll to the Network section
- check the 'Allow to generate HAR with sensitive data' checkbox
Step 4: Generate traffic
To capture all network activity on the webpage, you'll need to reload the page or perform the specific actions that trigger the network requests you're interested in (e.g., submitting a form, clicking a link, etc.).
Note: the actions must be completed in the same tab as Developer Tools is open in for the traffic to be recorded
Step 5: Stop Recording
- Once you've captured the network activity you need, return to the "Network" tab in Developer Tools. You should see a list of network requests made by the webpage.
- Click the red "Stop" button (square icon) in the top-left corner of the "Network" tab to stop recording network activity.
Step 6: Export the HAR File
Export the HAR file using one of the methods below:
- In Network Requests
- Right-click anywhere in the list of network requests.
- Select Copy > "Copy All as HAR (sanitized)".
- Choose a location on your computer to save the HAR file, give it a descriptive name, and click "Save."
or
- From Network settings bar
- Click "Export HAR (sanitized)"
- Choose a location on your computer to save the HAR file, give it a descriptive name, and click "Save."
Firefox
Step 1: Open Network Monitor
Open Network Monitor (Web Developer Tools, Network tab) using one of the options below:
Step 2: Persist Logs
- Ensure the "Persist logs" checkbox is checked.
This option keeps the network log intact even after a page refresh or navigation.
- Optionally, you can clear the network log by clicking the bin icon
Step 3: Generate Traffic
To capture all network activity on the webpage, you'll need to reload the page or perform the specific actions that trigger the network requests you're interested in (e.g., submitting a form, clicking a link, etc.).
Note: the actions must be completed in the same tab as Web Developer Tools is open in for the traffic to be recorded
Step 4: Stop Recording
Once you've captured the network activity you need, return to the "Network" tab in Web Developer Tools. You should see a list of network requests made by the webpage.
- Click the "pause" button, | | , to stop recording network activity.
Step 5: Export the HAR File
Export the HAR file using one of the methods below:
- In Network Requests
- Right-click anywhere in the list of network requests.
- Select "Save All As HAR".
- Choose a location on your computer to save the HAR file, give it a descriptive name, and click "Save."
or
- From Network settings bar
- Click "HAR"
- Select "Save All As HAR".
- Choose a location on your computer to save the HAR file, give it a descriptive name, and click "Save."
Useful Links
How to get HAR files for webviews?
How to enable dtHealthCheck