How to generate a HAR file
Follow
What is a HAR file?
A HAR (HTTP Archive) file is a JSON format file that records network requests and responses that occur on a web page, and is a useful tool for analyzing or debugging web performance issues. This file contains detailed information about all HTTP transactions, including page loading time, resource loading, request and response headers, etc.
How to use HAR files
By providing HAR files to your development team, you can quickly identify and resolve the cause of the problem . For example, you can easily check the page loading speed or the delay time that occurs in a specific request, so you can analyze performance or network traffic issues more quickly and accurately.
How to record a HAR file
(*Click on the browser you are using to go to that method)
4. Safari
5. Whale
1. Recording HAR files in Google Chrome
-
Open Developer Tools
- Click the three dots menu in the upper right corner of the browser > More tools > Developer tools , or
-
Press F12 to open the developer tools.
-
Select the Network tab
In the developer tools, click the Network tab.
- Make sure the record button is red.
- Make sure the Preserve log checkbox is checked.
-
Clear and refresh network entries
Clears the recorded log entries and refreshes the page for a clean network log capture.
- Click the ⊘ button, or press Ctrl + L (Windows) or Cmd + K (Mac).
-
Refresh the page by pressing Ctrl + R (Windows) or Cmd + R (Mac).
-
Save HAR file
After reproducing the part where error occurs and the network request is logged, click the 📥 icon in the upper right corner of Network tab to save the HAR file.
2. Recording HAR files in Mozilla Firefox
-
Open Developer Tools
- Click the three dots menu in the upper right corner of the browser > More tools > Developer tools , or
-
Press F12 to open the developer tools.
-
Select the Network tab
In the developer tools, click the Network tab.
-
Clear and refresh network entries
Refresh the page after clearing the recorded log entries to capture a clean network log.
- 🗑️ Click the button, or press Ctrl + L (Windows) or Cmd + K (Mac).
-
Refresh the page by pressing Ctrl + R (Windows) or Cmd + R (Mac).
-
Save HAR file
After reproducing the part where error occurs and the network request is recorded, right-click inside Network tab and select " Save All As HAR " to save the file.
3. Recording HAR files in Microsoft Edge
-
Open Developer Tools
- Click the three dots menu in the upper right corner of the browser > More tools > Developer tools , or
-
Press F12 to open the developer tools.
-
Select the Network tab
In the developer tools, click the Network tab.
- Make sure the record button is red.
- Make sure the Preserve log checkbox is checked.
-
Clear and refresh network entries
Refresh the page after clearing the recorded log entries to capture a clean network log.
- Click the ⊘ button, or press Ctrl + L (Windows) or Cmd + K (Mac).
-
Refresh the page by pressing Ctrl + R (Windows) or Cmd + R (Mac).
-
Save HAR file
After reproducing the part where error occurs and the network request is logged, click the 📥 icon in the upper right corner of Network tab to save the HAR file.
4. Recording HAR files in Safari
-
Open Developer Tools
- Click Safari menu > Develop > Open Web Inspector .
(If you don't see the developer tools, you may need to check the Enable developer tools option in Safari Preferences.)
- Click Safari menu > Develop > Open Web Inspector .
-
Select the Network tab
In the developer tools, select the Network tab.
-
Clear and refresh network entries
Refresh the page after clearing the recorded log entries to capture a clean network log.
- 🗑️ Click the button, or press Ctrl + L (Windows) or Cmd + K (Mac).
-
Refresh the page by pressing Ctrl + R (Windows) or Cmd + R (Mac).
-
Save HAR file
After reproducing the part where error occurs and the network request is recorded, click the Export button in the upper right corner within Network tab to save the HAR file.
4. Recording HAR files in Whale
-
Open Developer Tools
- Click the three dots menu in the upper right corner of the browser > More tools > Developer tools , or
-
Press F12 to open the developer tools.
-
Select the Network tab
In the developer tools, click the Network tab.- Make sure the record button is red.
- Make sure the Preserve log checkbox is checked.
-
Clear and refresh network entries
Refresh the page after clearing the recorded log entries to capture a clean network log.
- Click the ⊘ button, or press Ctrl + L (Windows) or Cmd + K (Mac).
-
Refresh the page by pressing Ctrl + R (Windows) or Cmd + R (Mac).
-
Save HAR file
After reproducing the part where the error occurs and the network requests are logged, save the HAR file by clicking the 📥 icon in the top right corner within Network tab.
Comments
0 comments
Please sign in to leave a comment.