How to save and generate HAR file in Chrome browser?

 

 

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.

BrowserHow.com Generate HAR File

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:

  1. Launch the Chrome browser on your PC.
  2. Open the page whose logs you need to collect.
  3. Click on thevertical 3dots icon located at the top right and select More tools > development tools.
    Developer tools options in the Chrome menu listYou can also access the same via the Ctrl + Change + I chrome shortcut key combination.
  4. Go to Network and activate the checkbox Keep the log option.
    Network tab log retention options on Chrome computer
  5. Refresh the web page usingreload arrow icon OR Ctrl/Cmd +R key, this should start recording.
    Make sure you see the red circular icon, if it’s gray, then click it once so it turns red.
    Saving Chrome Network tab for HAR file
  6. Now try and reproduce the problem that you faced earlier so that it would be recorded in those HAR error logs.
  7. Click on the red circular icon to stop recording.
    Save Network tab in Chrome browser
  8. Click on the Download icon on the far right to export this HAR file.
    Download button to save network logs as a HAR file
  9. Give sort any name of your choice (but leave the extension as .har) and press Save.
    Save the HAR file with the .har file extension

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.

 

Leave a Reply

Your email address will not be published. Required fields are marked *