How to generate a HAR files

Summary

While troubleshooting performance issues, it is sometimes necessary to obtain additional information about the network requests that are generated in the browser when an issue occurs. To assist in diagnosing these types of issues, you may need to record a HAR file or a log of network requests while that issue is occurring, and provide that file for further analysis.

What is an HTTP Archive (HAR) file?

HAR, short for HTTP Archive, is a format used for tracking information between a web browser and a website. A HAR file is primarily used for identifying performance issues such as bottlenecks, slow load times, and page rendering problems. The HAR file keeps track of each resource loaded by the browser along with timing information for each resource.

Steps

You can easily generate a HAR file using Google Chrome with the given instructions. For additional browser support, see the Atlassian documentation to generate a HAR file.  

  1. Open Google Chrome and go to the page where the issue occurred.

  2. From the Chrome menu bar, select View > Developer > Developer Tools.

  3. From the Developer Tools panel that appears, select the Network tab. By default, the Developer Tools are loaded at the bottom of your screen.  

  4. Check the Disable Cache option in the Network tab toolbar to prevent caching of resources for this specific page.

  5. Look for a round red Record button in the upper left corner of the Network tab. If the button is grey, click to start recording. 

  6. Check the Preserve log option.

  7. Click the Clear button (next to the Record button) to clear out any existing logs from the Network tab.

  8. Now, try to reproduce the issue that you are experiencing while the network requests are being recorded.

  9. Once you have reproduced the issue, right-click anywhere on the grid of network requests, and select Save as HAR with Content to save the file to your computer.

  10. Zip the file to make it smaller as these files can be quite large. If you are on a Mac, you can right-click the HAR file from Finder and choose Compress from the menu to compress it. 

  11. Attach your zipped HAR file to your ticket so that it can be used for analysis.




Additional references

Read similar steps described by Atlassian:

https://confluence.atlassian.com/kb/generating-har-files-and-analyzing-web-requests-720420612.html

HAR file viewers

http://www.softwareishard.com/har/viewer/
https://toolbox.googleapps.com/apps/har_analyzer/
https://chrome.google.com/webstore/detail/http-archiveviewer/ebbdbdmhegaoooipfnjikefdpeoaidml?hl=en
http://www.softwareishard.com/blog/har-viewer/