Submit a request
Submit a request

How to Generate a HAR File

What is a HAR file

Sometimes, when troubleshooting complex issues, a member of the Learnosity support team will ask you to provide a HAR file.

A HAR file, or HTTP Archive format, is used for tracking all interactions between a web browser and a website. This information is stored in a JSON file which is easy to read and helps visualise a large amount of data. Specifically, this data is a log of network requests that can capture the details of any errors as they occur. 

For that reason, it is often used for identifying performance issues such as increased loading times, page rendering difficulties and error codes that might result from these problems. 

As such, HAR files provide a lot of information about HTTP requests that help with debugging, for example browser settings and cookies, the amount of time spent receiving response data, how long it took to establish a server connection or how long before a request could be sent.

 

Please note that HAR files can contain sensitive data. No Learnosity staff member will ask for such a file unless you have raised a support issue or reported an error.

 

To generate the HAR file for Chrome

  1. Open Google Chrome and go to the page where the issue is occurring.
  2. On the Chrome menu bar select View > Developer > Developer Tools.
  3. From the panel opened at the bottom of your screen, select the Network tab.
  4. Look for a round 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.
  5. Check the box next to Preserve log.
  6. Click the Clear button to clear out any existing logs from the Network tab.
  7. Now try to reproduce the issue that you were experiencing before, while the network requests are being recorded.
  8. Once the issue has been reproduced, right-click anywhere on the grid of network requests, select Save as HAR with Content.
  9. Save the HAR file to your desired location.
  10. Upload your HAR file to your ticket so that we may analyze it.

2019-01-16_16-08-42.gif

To generate the HAR file for Firefox

  1. Open Google Chrome and go to the page where the issue is occurring.
  2. Select the Firefox menu (three horizontal parallel lines) at the top-right of your browser window, then select Web Developer > Network.
  3. The Developer Network Tools will open as a docked panel at the side or bottom of Firefox. Click on the Network tab.
  4. Check the box next to Persist Logs.
  5. The recording will autostart once you start performing actions in the browser.
  6. Once the issue has been reproduced, right-click anywhere on the grid of network requests, select Save as HAR with Content.
  7. Save the HAR file to your desired location.
  8. Upload your HAR file to your ticket so that we may analyze it.

 

2019-01-16_16-15-40.gif

 

To generate the HAR file for Safari

  1. Open Safari Chrome and go to the page where the issue is occurring.
  2. Open the Preferences and select the Advanced tab.
  3. Ensure that Show Develop menu in menu bar is ticked.
  4. Open the Develop menu and select Show Web Inspector.
  5. Activate the Network tab.
  6. Check the box next to Preserve log.
  7. Complete the activity that is causing issues.
  8. Click the Export icon and save the web archive file.
  9. Upload your HAR file to your ticket so that we may analyze it.

 

2019-01-16_16-23-26.gif

 

To generate the HAR file for Internet Explorer

  1. Press F12 on your keyboard(or click the gear icon > F12 Developer Tools)
  2. Click the Network tab.
  3. Reproduce the issue that you were experiencing before, while the network requests are being recorded.
  4. Once done click the Save button.
  5. Give the trace a filename and click the Save button which will save it as a .har file.
  6. Upload your HAR file to your ticket so that we may analyze it.
Was this article helpful?
0 out of 0 found this helpful

Did you arrive here by accident? If so, learn more about Learnosity by clicking here.