What is a HAR file?
HAR stands for HTTP Archive and is a file containing information about HTTP events that occur within your web browser. It is essential for troubleshooting issues that may not show any output in log files but present themselves within the web browser.
Sanitizing HAR files
While we can't help or support the sanitization of HAR files, Cloudflare has released software for HAR file sanitization if you have concerns about the contents. Please see their GitHub repository here:
https://github.com/cloudflare/har-sanitizer
How do I generate a HAR file?
Generally, if you are experiencing an issue where a HAR file is needed, we would suggest trying to reproduce the issue in different web browsers, and with all extensions disabled first. That said, the process to generate a HAR file will be different depending on the web browser that you are using.
Microsoft Edge
- Open the Developer Tools from the menu (Menu > More Tools > Developer tools), or by pressing F12 (or Fn-F12) on your keyboard.
- Open the Network tab (you may need to press the >> button to show more options).
- Look for a round button at the top left of the Network tab. Make sure it's red. If it's grey, click it once to start recording.
- Turn on "Preserve log".
- Reproduce the issue.
- Save the capture by right-clicking on the grid and choosing "Save as HAR with Content".
Google Chrome
- Open the Developer Tools from the menu (Menu > More Tools > Developer tools), or by pressing F12 (or Fn-F12) on your keyboard.
- Click on the Network tab (you may need to press the >> button to show more options).
- Look for a round button at the top left of the Network tab. Make sure it's red. If it's grey, click it once to start recording.
- Turn on "Preserve log".
- You can use the clear button (a circle with a diagonal line through it) right before trying to reproduce the issue to remove unnecessary header information.
- Reproduce the issue.
- Save the capture by right-clicking on the grid and choosing "Save as HAR with Content".
Mozilla Firefox
- Start Firefox Developer Tools in Network mode (Top right menu > Developer > Network, or Ctrl-Shift-E / Cmd-Alt-E on macOS).
- Turn on "Persist logs" on the right.
- Reproduce the issue.
- Save the capture by right-clicking on the grid and choosing "Save all as HAR".
Safari
- With Safari open, click the 'Safari' menu.
- Open the 'Preferences' and select the 'Advanced' tab.
- Ensure that Show Develop menu in menu bar is ticked.
- Open the Develop menu and select Show Web Inspector.
- Activate the Network tab.
- Complete the activity that is causing issues.
- Click the Export icon and save the .har file.
- Send us the file via your support ticket.
Obtaining a HAR file from pop-up windows
There may be times when you need to obtain a HAR file for a window that has popped up. It's worth noting that the HTTP traffic that occurs in popup windows that have spawned from main windows are not collected in the HAR file. If you wish to obtain a HAR file from a popup window, then you will need to perform the below:
- Run the application, or perform the action that generates the popup window:
- Once the popup window has presented itself, right-click on it and inspect it as you would in the steps mentioned above, to collect a HAR file:
- From there, browse to the network tab on the devtools window and reload the popup window:
- You'll notice that the HTTP traffic from reloading the application specifically, has since populated the HTTP response sections. Now, you can save the application-specific traffic by right-clicking on the devtools window and saving:
Comments