Generate a HAR file for Troubleshooting

Summary

This article provides information on how generated a .har file in several of the most common web browsers.

Body

Overview

Occasionally when troubleshooting web applications support technicians may request additional information about the network requests that are generated in your browser. They may ask you to record a HTTP Response Archive (HAR) file, or a log of network requests, while that issue occurs. It's helpful to include any browser console logs in addition to a HAR file.

A HAR file is a JSON-formatted log file that records all network requests and responses between a web browser and a website during a specific session. Think of it as a flight recorder for your browser. It captures everything from page load times and headers to cookies and error codes.

A .har file may be requested by vendors of web based applications in order to diagnose complex bugs, failed logins, timeouts, or other broken features that only happen infrequently It can also be used by developers for performance analysis by looking at timing data inside the file to spot bottlenecks, slow-loading images, or delayed API responses.

Warning

Because it logs a live session, a HAR file can contain sensitive information, including authorization tokens, cookies, passwords typed into forms, and personal data. Anyone with access to the HAR file can view the data submitted while recording, which may include personal data or other sensitive data. Make sure that you secure the HAR file(s) accordingly. Cloudflare has released a HAR sanitizer that can be used to strip sensitive information. You should only share HAR files with trusted support teams and clear sensitive data before sharing if possible.

You should change your password and invalidate your active sessions immediately if your generated HAR file captured a login or authentication sequence and you did not explicitly scrub or redact the credentials.

Why you should change your password:

  • Plaintext Exposure: HAR files record browser traffic in standard JSON text, meaning any typed passwords, authorization headers, or private tokens are often stored in clear text.
  • Session Hijacking: Even if your password wasn't typed during the recording, the file likely captured active session cookies or bearer tokens that allow anyone with the file to impersonate your live browser session.
  • Vendor Storage Risks: Once sent, the file sits in the vendor's support ticketing system or employee inboxes where it may persist longer than necessary.

Best Practices:

  • Rotate Credentials: Change the password for the affected service right away.
  • Logout Active Sessions: Terminate existing login sessions from your account settings menu.
  • Sanitize Future Files: Open future HAR files in a text editor to search for and replace sensitive strings like password or auth before sharing them.

In this article:

What materials do I need?

  • Internet connectivity
  • Web browser
  • Access to site/service experiencing the issue

How do I use this technology?

Tip
As a general best practice, if you know you'll be generating a HAR file it is strongly recommended to close all browser windows and tabs. Quit the browser, then reopen the browser application making sure to only have a single browser window/tab open. This helps to minimize the amount of data captured in the har file.

Apple Safari

  1. Open Safari.
  2. In the Mac's menu bar click Safari.
  3. Click Settings.
  4. Click the Advanced tab.
  5. Check the box for Show features for web developers.
  6. Close the Safari Settings window.
  7. Navigate to the webpage where you experience the issue.
  8. Click the Develop menu
  9. Click the Show Web Inspector (or press Option + Command + I ).
  10. Click the Network tab inside of the Web Inspector.
  11. Reproduce the issue by performing the steps that caused the problem on the website while the network tab stays open.
  12. Click the Export icon in the top right corner of the Network tab.
  13. Choose where to save the file on your computer.

Google Chrome

  1. Open Google Chrome and go to the webpage where the problem happens.
  2. Click the menu (three vertical dots in the top right).
  3. Click More Tools.
  4. Click Developer Tools.
  5. Click the Network tab in the panel that opens.
  6. Look for the small round button in the top-left corner of the Network tab and make sure it is red.
    1. If it is gray, click it once to start recording.
  7. Check the box next to Preserve log so your logs do not get erased when the page changes or redirects.
  8. Click the Clear button (a gray corssed-out circle) to clear any old logs out of hte list.
  9. Reproduce the issue by performing the exact actions that caused the problem on the website.
  10. Click the Export HAR download icon (an arrow pointing down) at the top of th Network, or right-click any item in the list and select Save all as HAR with content.
  11. Choose a location on your computer like your desktop, name the file, and click Save.

Microsoft Edge

  1. Open Microsoft Edge and go to the web page where the problem happens.
  2. Press F12 (or Ctrl + Shift + I) on your keyboard to open the Microsoft Edge DevTools.
  3. Click on the Network tab in the developer panel.
  4. Check the box for Preserve log so data is not lost when pages reload.
  5. Check that the round Record button in the top-left corner of the Network tab is red. If it is gray, click it to start recording.
  6. Click the Clear (prohibition/trash) icon to clear out any old network logs.
  7. Replicate or reproduce the issue you are facing on the webpage.
  8. Click the downward arrow or Export HAR icon (or right-click anywhere in the network request list and select Save all as HAR with content).
  9. Choose a location on your computer and save the file.

Mozilla Firefox

  1. Open Firefox and go to the web page where the problem happens.
  2. Open the developer tools by pressing F12 (or Ctrl+Shift+I on Windows/Linux, or Cmd+Option+I on Mac). Alternatively, click the menu icon (three horizontal lines) in the top-right, select More Tools, then Web Developer Tools.
  3. Click on the Network tab.
  4. Click the Gear icon (Settings) in the upper-right corner of the network panel and turn on Persist Logs so data is not lost during page reloads or navigation.
  5. Click the Trash bin icon to clear any old logs.
  6. Replicate the issue or error by repeating the steps on the web page.
  7. Right-click anywhere inside the list of network requests (or click the gear icon again) and select Save All As HAR..
  8. Choose a location on your computer and click Save.

Need additional help or have issues

For immediate assistance please review the Contact Us page for the appropriate support group.

Details

Details

Article ID: 1810
Created
Fri 2/23/24 11:36 AM
Modified
Fri 9/4/26 1:16 PM