How to Generate a HAR file

Summary

When troubleshooting performance issues, it is sometimes necessary to obtain additional information about the network requests that are generated in your browser while 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 then provide that file for further analysis.

Steps

Below are the instructions for how you can easily generate a HAR file using Google Chrome. For additional browser support, see the Atlassian documentation for generating a HAR file.  

  1. Open Google Chrome and go to the page where the issue is occurring.
  2. From the Chrome menu bar select View > Developer > Developer Tools.
  3. From the Developer Tools panel that opens on your screen, select the Network tab. By default the Developer Tools will load 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 Record button ( Record button ) in the upper left corner of the Network tab, and make sure it is red. If it is grey, click it once to start recording. 
  6. Check the box next to Preserve log.
  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, select Save as HAR with Content , and save the file to your computer.
  10. Zip the file to make it smaller. Sometimes these files can be quite large.  If you are on a Mac you can compress the file by right-clicking on the HAR file from Finder and choosing Compress from the menu. 
  11. Attach your zipped HAR file to your ticket so that it may analyze it.

References

Here are 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-archive-viewer/ebbdbdmhegaoooipfnjikefdpeoaidml?hl=en

http://www.softwareishard.com/blog/har-viewer/