How to generate and capture HTTP Archive format(HAR) files

How to generate and capture HTTP Archive format(HAR) files

book

Article ID: KB0081008

calendar_today

Updated On:

Products Versions
TIBCO LiveView Web 1.4.0

Description

The HTTP Archive format or HAR, is a JSON-formatted archive file format for logging of a web browser's interaction with a site.
HAR files can be a requirement for troubleshooting issues specifically for problems listed below:
- Performance issue: slow page load, timeout when performing certain task
- Page rendering: incorrect page format, missing information

Find below directions for how the generate a capture file in each browser(Chrome, IE, FireFox and Safari).
 

Issue/Introduction

How to generate and capture HTTP Archive format(HAR) files

Environment

All supported environments

Resolution

How to generate a HAR capture file in Chrome
1. In Chrome, go to the page within Box where you are experiencing trouble.
2. Select the Chrome menu (⋮) at the top-right of your browser window, then select Tools > Developer Tools. The Developer Tools will open as a docked panel at the side or bottom of Chrome. Click on the Network tab.
3. Select the option Preserve log The recording should autostart and you will see a red circle at the top left of the Network tab. If not, click the black circle, to start recording activity in your browser.
4. Refresh the Box page you are on. The goal is to reproduce the problem you've been experiencing while Google Chrome is recording activity.
5. Once you have successfully reproduced the issue while recording, right-click within the Network tab and click Save as HAR with Content to save a copy of the activity that you recorded. Save the HAR file somewhere convenient.
6. Now click the Console tab and right-click anywhere in the console log. Select the popup option "Save as..." and name the log file: Chrome-console.log Close the developer panel.
Attach both the HAR file and the Chrome-console.log to your case.

How to generate a HAR capture file in FireFox
1. In Firefox, go to the page within Box where you are experiencing trouble.
2. Select the Firefox menu (Three horizontal parallel lines) at the top-right of your browser window, then select Developer > Network. The Developer Network Tools will open as a docked panel at the side or bottom of Firefox.
3. Click on the Network tab. Before starting the capture, be sure to enable the setting: Enable persistent logs in the Toolbox Options > Common Preferences (click on gear icon on the Toolbox toolbar to open the Toolbox Options pane). Click on the Network tab after setting the option. The recording will autostart once you start performing actions in the browser.
4. Refresh the Box page you are on. The goal is to reproduce the problem you've been experiencing while Firefox is recording activity.
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" Save the HAR file somewhere convenient and close the developer panel. 

How to generate a capture file in Internet Explorer (IE)
Use Microsoft F12 Developer Tools and the Network Tool to capture the browser headers. Then export the captured traffic as HAR file (or XML if using an older version of IE).
1. Press the F12 key on your keyboard. This should open the Developer Tools panel in IE. If not, find it on the browser menu: F12 Developer Tools
2. In the Developer Tools panel, click the Network panel and then deselect the Clear entries on navigate option. (on by default).
3. Click the Network panel/button and then the Start Capturing button (or press Ctrl + E). Note: the icon looks like a green triangle
4. Click the IE Refresh button. The goal is to reproduce the problem you've been experiencing while IE is recording activity The Developer Tool panel should now show a list of the URLs that are included in the page you have in your browser.
5. Click the Stop button when the issue has been reproduced (or press Ctrl + E). Note: the icon looks like a red square
6. Click the Export captured traffic icon and save the file somewhere convenient (or press Ctrl + S). Note: the icon looks like a floppy disk. Please attach the file to your case.
7. Click on the Console tab and look for any errors/warnings reported. If errors are shown, please right-click on the console errors and select Copy all or send a screenshot of them. Close the Developer Tools panel

How to generate a HAR capture file in Safari
In Safari, go to the page within Box where you are experiencing trouble.
1. Right-click anywhere on the page and select "Inspect Element". (If you do not see this option, enable the Web Inspector.
2. Go to the Console tab and check the option Preserve Log.
3. Go to the Network tab and check the option Preserve Log.
4. Refresh the Box page you are on. The goal is to reproduce the problem you've been experiencing while Safari is recording activity.
5. Once you have reproduced the issue and recorded it, go to the Network tab and click Export to save a copy of the activity that you recorded. Save the HAR file somewhere convenient.
6. Now click the Console tab and take a screenshot. Depending on how much shows up there, you may need to expand the window by dragging the top border up to capture more information. Close the Web Inspector
Attach both the HAR file and the Console log screenshots to case.
 

Additional Information

https://en.wikipedia.org/wiki/.har