How to generate HAR file in Chrome|Firefox|IE or edge
This blog post explores what a HAR file is, its purpose, how to generate one in Chrome, Firefox, and Safari, and tools to view HAR files.
What is the HAR file?
A HAR
file stands for HTTP Archive file, utilized for storing HTTP session information related to a webpage’s HTTP requests. This file is formatted in JSON and carries the extension .har
. It contains network call details for one or multiple web pages.
The har file is an acronym for the HTTP archive file, which is used to store the HTTP session information for all of a webpage’s HTTP requests. This file’s content is in json format. And file extension is HAR This file contains network call information for a single web page or multiple web pages.
What type of data does it contain?
- Records all network calls with status
- Stores cookies and session information
- Captures client information submitted by users
- Logs web browser page information
How is this data used?
- Browser-side performance inspection, such as identifying slow page loads and monitoring third-party call durations and statuses
- Facilitating client-side issue debugging
- Conducting performance analysis
Below are steps to download HAR files for offline web request troubleshooting.
How to Generate a HAR File in Chrome?
Open Chrome browser.
Access developer tools using either the shortcut
Ctrl + Shift + I
or via the menu (More Tools -> Developer Tools).Navigate to the Network tab within developer tools.
Visit the webpage whose information you wish to track.
Ensure the
Preserve log
option is checked to capture page interaction information in a single HAR file.Use the up and down arrow icons; the down arrow exports HAR files.
Click the down arrow (colored
red
in the screenshot below).
Generating a HAR File in Firefox Browser
- Launch Firefox browser.
- Open developer tools using either the shortcut
Ctrl + Shift + E
or via the menu (Tools -> Web Developer -> Network). - Navigate to the webpage you want to track.
- Click on the icon located on the right side, then select
Save All As HAR
to generate the HAR file. - Page navigation information can also be captured using the
Persist Logs
option.
Generating a HAR File in Internet Explorer or Edge Browser
Open Internet Explorer (IE) or Edge browser.
Access Developer tools using the
F12
shortcut or via the menu (More Tools -> Developer Tools)Navigate to the Network tab.
Visit the webpage you want to track.
Click the save icon or use
Ctrl + S
to export the HAR file.Refer to the screenshot below for the save icon’s location.
HAR File Analyzer Tools
Once you’ve downloaded the HAR file using the steps above, you can utilize tools like the Google HAR Analyzer🔗 to analyze its contents.
Conclusion
This article discussed the purpose of HAR files and outlined how to generate them in different browsers.
We hope you found this article helpful.