In this article, you can learn how to create a HAR file.
Warning: Please be aware that HAR files contain sensitive information that you will be providing to us. As a precaution, please invalidate your session by logging out of Happeo after the HAR file is generated.
When you experience issues related to performance (long lead time, loading issues, etc.), our team may ask you to provide a HAR file. The file shows where the website issues are and how they can be combated and overcome.
What is a HAR file?
The HAR file contains information such as timing components generated by your browser. Some details and data displayed in a HAR file are the following:
- Stalled/Blocking
- Proxy Negotiation
- DNS Lookup
- Initial Connection / Connecting
- SSL
- Request Sent / Sending
- Waiting (TTFB)
- Content Download / Downloading
The file has JSON format which needs a HAR reader app to be viewed. The file can also be viewed through Chrome’s Developer Tool in waterfall view, which enables you to see further details by hovering your mouse on the line.
How can you create a HAR file?
This depends on the type of browser you are using. This article will provide you with a breakdown of the most common browser types.
Microsoft Edge
- Open developer tools
- Right-click on the webpage and select "Inspect"
- Or, use the keyboard shortcut: Ctrl + Shift + I (Windows/Linux) or Cmd + Option + I (Mac)
- Click on the "Network" tab in the Developer Tools
- Ensure the "Preserve log" checkbox is ticked. This will start recording network activity
- Perform the actions that trigger the problem you're experiencing
- Right-click anywhere in the network log
- Select "Save as HAR with content”
- Choose a location and filename for your HAR file
Mozilla Firefox
- Open developer tools
- Right-click on the webpage and select "Inspect"
- Or, use the keyboard shortcut: Ctrl + Shift + I (Windows/Linux) or Cmd + Option + I (Mac)
- Click on the "Network" tab in the Developer Tools
- Note: Firefox automatically starts recording network activity when you open the Network tab
- Perform the actions that trigger the problem you're experiencing
- Right-click anywhere in the network log
- Select "Save All As HAR"
- Choose a location and filename for your HAR file
Chrome
- Open developer tools
- Right-click on the webpage and select "Inspect"
- Or, use the keyboard shortcut: Ctrl + Shift + I (Windows/Linux) or Cmd + Option + I (Mac)
- Click on the "Network" tab in the Developer Tools
- Ensure the "Preserve log" checkbox is ticked. This will start recording network activity
- Perform the actions that trigger the problem you're experiencing
- Method 1: Export HAR
- Click the download button (looks like an arrow pointing down into a horizontal line; located in the same area as the “Preserve log” checkbox)
- This will save the HAR file onto your computer
- Method 2: Copy HAR
- Right-click on any item in the "Name" column of the Network tab
- Go to "Copy" and select "Copy all as HAR (Sanitized)”
- Open a text editor (like Notepad or TextEdit)
- Paste the copied HAR data into the text editor
- Save the file with a .har extension (e.g., my_har_file.har)
- Method 1: Export HAR
Note: The "Sanitized" HAR file removes sensitive information like cookies and authentication tokens.
Safari
- Go to the Safari menu and select "Preferences"
- In the "Advanced" tab, check the "Show Develop menu in menu bar" option
- Go to the "Develop" menu and select "Show Web Inspector"
- Click on the "Network" tab in the Developer Tools
- Note: Safari automatically starts recording network activity when you open the Network tab
- Perform the actions that trigger the problem you're experiencing
- Click the "Export" button in the top right corner of the Network tab
- Choose a location and filename for your HAR file