How to create a .HAR file using different web browsers [Cognite Official]

  • 1 November 2022
  • 0 replies
  • 602 views

Userlevel 2
Badge +1

As Support team we can sometimes ask you to share a .HAR file when you report an issue in a web application.

HAR is the short form for HTTP ARchive format, which tracks all the logging of web browser's interaction with a site.

It will save time if you already attach this file when you reach out to us initially. 

 

If you are experiencing any of the below issues, a .HAR file will be useful:

  • Performance issues: slow page loading, timeouts when performing certain task

  • Page rendering issues: incorrect page format, missing information

  • Issues in the UI
     

 If you want to know how to generate a file like that, keep on reading!

 

Generating a .HAR file for Google Chrome

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

  2. Look for the vertical ellipsis button (three stacked dots) and select More Tools > Developer Tools.

  3. From the panel opened, select the Network tab.

  4. Look for a round record button ( 🔴 ) in the upper left corner of the tab, and make sure it is red. If it is grey, click it once to start recording.

  5. Check the box Preserve log.

  6. Click the Clear button ( 🚫 ) to clear out any existing logs from the Network tab.

  7. Reproduce the issue that you were experiencing before, while the network requests are being recorded.

  8. Once you have reproduced the issue, in Chrome, click Export .HAR to download. Then save the file to your computer: Save as .HAR with Content.
    Chrome export option

  9. Upload your .HAR file to your ticket or attach it to your email so that our Support team can analyze it.
     

Generating a .HAR file in Internet Explorer/Microsoft Edge 

  1. Open Internet Explorer and go to the page where the issue is occurring.

  2. Press F12 on your keyboard (or click the gear icon  >  F12 Developer Tools).

  3. Click the Network tab.

  4. Reproduce the issue that you were experiencing before, while the network requests are being recorded.

  5. Once done, click the Save button.

  6. Give the trace a filename and click the Save button which will save it as a .har file or .xml file.

  7. Upload your HAR file to your ticket or attach it to your email so that we can analyze it.

The instructions are the same for a MAC computer or a Windows computer.

developer_console

 

Generating a .HAR file in Firefox

  1. Open Firefox and go to the page where you are experiencing trouble.

  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 opens as a docked panel at the side or bottom of Firefox. Click the Network tab.

  4. The recording autostarts when you start performing actions in the browser.

  5. Once you have reproduced the issue and you see that all of the actions have been generated in the Developer Network Panel (should just take a few seconds), right-click anywhere under the File column, and click on Save all as Har.

  6. Save the .HAR file somewhere convenient.

  7. Upload your .HAR file to your ticket or attach it to your email so that we can analyze it.

The instructions are the same for a Mac computer or a Windows computer.

 

Generating a .HAR file in Safari

Before generating the HAR file, make sure you can see the Develop menu in Safari. If it is not there, follow the instructions.
If you don’t see the Develop menu in the menu bar, choose Safari  >  Preferences, click Advanced, then select “Show Develop menu in menu bar”.

  1. Open the Develop menu and select Show Web Inspector.

  2. Click the Network tab and complete the activity that is causing issues.

  3. Click the Export icon on the far right of the network tab and save the HAR file.

  4. Send us the file via your support ticket.

 

Note: User sessions are managed via your IDP. Access token lifetime can vary from 60 to 90 minutes. Unless you are sharing the .HAR more than 90 minutes after generating it, you can choose to remove the access token from the .HAR file. After removing sensitive information, make sure to double-check whether the modified file is in the correct format. 


0 replies

Be the first to reply!

Reply