How to Generate a HAR File for Troubleshooting
When any complex issues arise on your websites using CX platform, the Support team may require additional information from you to troubleshoot the issue. This information includes the network requests generated in your browser while a problem is still in occurrence. The Support team may request you to record a HAR (HTTP Archive) file and revert to them for further analysis.
A HAR file is used to identify performance issues, such as slow load times, page rendering, browser, and performance. The HAR file keeps track of each resource loaded by the browser and timing information for each resource. Thus, helping in debugging complex issues.
Most browsers support the HAR file format, including Google Chrome, Mozilla Firefox, Apple Safari, Microsoft Edge, and Internet Explorer.
This article acquaints you in creating HAR files in different browsers.
Note: Ensure to keep HAR files in a safe place as they contain sensitive data, including:
Content of the pages you downloaded while recording
Your cookies, which allows anyone with the HAR file to impersonate the account
All the information that you submitted while recording
- 1 Step-by-Step Instructions
- 1.1 1. Chrome
- 1.2 2. Firefox
- 1.3 3. Internet Explorer
- 1.4 4. Safari
- 1.5 5. Edge
Step-by-Step Instructions
The following are the step-by-step instructions about how you can generate a HAR file via different browsers.
Chrome
Firefox
Internet Explorer
Safari
Edge
1. Chrome
To generate the HAR file for Chrome, follow these steps:
Open Google Chrome and go to the page where the issue is occurring.
Look for the vertical ellipsis button and select More Tools > Developer Tools. Or you can right-click anywhere on the webpage and click Inspect on the pop-up menu.
From the panel opened, select the Network tab.
Look for the Record network log button in the upper left corner of the tab, and make sure it is red. If it is grey, click it once to start recording.
Select the Preserve log check box.
Click the Clear button to clear out any existing logs from the Network tab.
Reproduce the issue that you were experiencing before while the network requests are being recorded.
Once you have reproduced the issue, right-click the network request log, and select Save all as HAR with content.
Save the file to your computer in .har format.
Note: The steps to generate the HAR file are the same for MAC and Windows.
2. Firefox
To generate the HAR file for Firefox, follow these steps:
Open Firefox and go to the page where you are experiencing the issue.
Select the Firefox menu (three horizontal parallel lines) at the top-right of your browser window, then select Web Developer > Network. Or you can right-click anywhere on the webpage and click Inspect on the pop-up menu.
The Developer Network Tools opens as a docked panel at the side or bottom of Firefox.Click the Network tab.
The recording auto starts when you start performing actions in the browser.
Once you have reproduced the issue, and you see that all the actions have been generated in the Developer Network Panel, right-click anywhere under the File column, and click Save all as Har.
Save the HAR file on your computer.
After that, please share your HAR file with our Support team.
Note: The steps to generate the HAR file are the same for MAC and Windows.
3. Internet Explorer
To generate the HAR file for Internet Explorer, follow these steps:
Open Internet Explorer and go to the page where the issue is occurring.
Press F12 on your keyboard or click the Gear icon > F12 Developer Tools. Or you can right-click anywhere on the webpage and click Inspect on the pop-up menu.
Click the Network tab.
Reproduce the issue that you were experiencing before while the network requests are being recorded.
Once done, click the Export as HAR button or Ctrl S.
Save the file to your computer in .har format.
After that, please share your HAR file with our Support team.
4. Safari
Before you generate the HAR file, ensure that you have the Develop menu in Safari. If you do not see the Develop menu in the menu bar, choose Safari > Preferences, click Advanced, and select the Show Develop menu in the menu bar.
To generate the HAR file for Safari, follow these steps:
Open the Develop menu and select Show Web Inspector.
Click the Network tab and complete the activity that is causing issues.
Click the Export icon and save the HAR file.
After that, please share your HAR file with our Support team.
5. Edge
To generate the HAR file for Edge, follow these steps:
Open Microsoft Edge and navigate to the page where the issue is occurring.
Note: Edge is tab and window dependent, so if the issue occurs in a new tab or window, the HAR recording needs to be done in that new tab or window.Click the horizontal ellipsis menu button and select More Tools > Developer Tools. Or you can right-click anywhere on the webpage and click Inspect on the pop-up menu.
Click the Network tab and click the Record network log button in the upper-left corner of the tab and verify that it is red; if it is gray, click to start recording.
Select the Preserve Log check box.
Click the Clear button to clear out any existing logs from the Network tab.
Note: Do not close the Developer Tools panel, as this will end recording, and the needed HAR file will be lost.Reproduce the issue that was being experienced while the network requests are being recorded.
Once you have reproduced the issue entirely, right-click anywhere on the grid of network requests and choose Save as HAR with content and save the file to the computer.
After that, please share your HAR file with our Support team.