How to collect .har files and console logs from different browsers
10/29/2021 3 People found this article helpful 82,904 Views
This article provides instructions on how to collect HAR (HTTP Archive Viewer) logs in Google Chrome and Firefox.
HAR (HTTP Archive Format) is a JSON archive file format that stores session data over many browsers (IE, Firefox, Chrome, Safari, etc.) between client and server. In the network environment, when the communication between the sender and the receiver occurs, HAR contains HTTP response and request headers. The extension of the HAR file format is “.har”.
The HAR file is used to save the information of all web requests made with the browser tab.
To generate the HAR file for Chrome
Open Google Chrome and go to the page where the issue is occurring.
Look for the Vertical ellipsis button () and select More Tools > Developer Tools.
From the panel opened, select the Network tab.
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.
Check the box Preserve log.
Click the Clear button ( ) to clear out any existing logs from the Network tab.
Select Console and make sure Preserve Log checkbox is ticked.
Reproduce the issue that you were experiencing before, while the network requests are being recorded.
Once you have reproduced the issue, in Chrome, click Download. Then save the file to your computer: Save as HAR with Content.
To generate the HAR file for Firefox
Open Firefox and go to the page where you are experiencing trouble.
Select the Firefox menu (three horizontal parallel lines) at the top-right of your browser window, then select Web Developer > Network.
The Developer Network Tools opens as a docked panel at the side or bottom of Firefox. Click the Network tab.
The recording autostart when you start performing actions in the browser.
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 for further analysis.