The HAR file or HTTP archive file contains all the logs related to the network and browsing sessions used by developers to debug a problem on the web page. The generated HAR file records all interactions, including cookies and passwords in sessions.
If you come across a website that does not perform as expected and you want to pass the same to the network administrator, simply sending the screenshot of this issue with a few lines of error statements will not would not be of much help to them. .
Indeed, they would need the technical details of the site causing the error in order to understand the problem and therefore to correct it on your end. This is where the HAR file is very practical. It’s a HTTP archived file format used to record all interactions between your browser and the currently open website.
Some of the data it stores includes site load time, which resources are able to load properly and which are stuck, as well as issues with rendering items on the page. All of these types of network related data are then stored and compressed in a HAR format.
Once this file is created, you can export it and send it to the network administrator who can then read the technical details and act accordingly.
In this regard, Google Chrome has made it quite easy to create this network log file, and this guide will let you know the steps on how to do it. So without further ado, let’s get started.
Generate HAR file in Chrome
You do not need to add any extensions to generate a HAR log file. You can use the built-in developer tools to save error logs and generate HAR files.
Here are the steps to generate HAR file in Chrome browser:
- Launch the Chrome browser on your PC.
- Open the page whose logs you need to collect.
- Click on the located at the top right and select More tools > development tools.
You can also access the same via the + + chrome shortcut key combination.
- Go to Network and activate the checkbox Keep the log option.
- Refresh the web page using OR
Make sure you see the red circular icon, if it’s gray, then click it once so it turns red.
/ + key, this should start recording.
- Now try and reproduce the problem that you faced earlier so that it would be recorded in those HAR error logs.
- Click on the red circular icon to stop recording.
- Click on the
icon on the far right to export this HAR file.
- Give sort any name of your choice (but leave the extension as .har) and press
That’s it. The HAR file will be all logs will be saved to a file. You can send it by email to the relevant authority or by any other means of your choice.
Bottom Line: Create a HAR File in Chrome
It all came from this guide on how to create HAR file in Google Chrome. Keep in mind that when the logs are saved, it will store any resources that are loaded during this current browser session.
This may include cookies and any information that you save during this period (such as passwords, payment details, etc.). It is therefore better not to process confidential data while recording your session. Also, only send the HAR file if you trust the developers on the other end.
On that note, we conclude this tutorial on how to generate HAR files in Chrome browser. If you have any questions regarding the above instructions, let us know in the comments section below.
Finally, here are the recommended web browsers for your computer and mobile phone that you should try.
If you have any ideas about How to save and generate HAR file in Chrome browser?, so feel free to head over to the comment box below. If you find this article useful, consider sharing it with your network.