Generating Browser Debug (HAR) Files
What is a HAR File?
A HAR (HTTP Archive) file holds detailed information about how a web page loads inside a customers browser session. At times, IT support may request that a user generate and provide a HAR file to help troubleshoot complex web application issues. Information included in a HAR file includes:
- Detailed network request logs
- Cookies and web data
- Error codes generated by the web application
Note: HAR files can contain sensitive information such as client authentication tokens. It's advised to open the HAR file in a text editor and review it for any passwords before sending it to IT.
Generating a HAR File
Most modern browsers can generate a HAR file. The process is similar but different depending on the Browser being used.
Google Chrome
- Close all incognito windows in Google Chrome.
- Open a new incognito window in Google Chrome.
- Go to View > Developer > Developers Tools.
- In the Developer Tools pane, choose the Network tab.
- Check the Preserve Log checkbox to record all interactions.
- Visit the page and complete the steps that trigger the issue.
- Choose the Network tab.
- Click the down arrow to export the HAR file.
- Save the HAR file.
- Next remove any sensitive information from the file.
- Open the HAR file with a text editor of your choice.
- Search for all instances of "Password".
- Replace these values with a placeholder value such as "*****".
- Save the HAR file.
Safari
- Ensure that Show Develop menu in menu bar checkbox is checked under Safari > Preferences > Advanced.
- Choose File > Open New Private Window.
- Visit the web page where the issue occurs.
- Choose Develop > Show Web Inspector. The Web Inspector window appears.
- Complete the steps on the page that trigger the issue.
- Select the Network tab.
- Click Export on the upper right side of the pane.
- Save the HAR file.
- Next remove any sensitive information from the file.
- Open the HAR file with a text editor of your choice.
- Search for all instances of "Password".
- Replace these values with a placeholder value such as "*****".
- Save the HAR file.
Firefox
- Close all private windows in Firefox.
- Open a new private window in Firefox.
- Go to Tools > Developer > Network or ctrl-shift-E.
- Visit the page and complete the steps that trigger the issue.
- Choose the Network tab and right click and then select Save All As Har.
- Save the HAR file.
- Next remove any sensitive information from the file.
- Open the HAR file with a text editor of your choice.
- Search for all instances of "Password".
- Replace these values with a placeholder value such as "*****".
- Save the HAR file.
Microsoft Edge
- Close all InPrivate windows in Microsoft Edge.
- Open a new InPrivate window (Ctrl + Shift + N).
- Go to Settings and more (the ... icon) then choose More Tools > Developer Tools.
- Start a profiling session on the Network tab of the Developer Tools toolbar.
- Visit the page and complete the steps that trigger the issue.
- Select Export as HAR (Ctrl+S) and save the HAR file.
- Next remove any sensitive information from the file.
- Open the HAR file with a text editor of your choice.
- Search for all instances of "Password".
- Replace these values with a placeholder value such as "*****".
- Save the HAR file.
Internet Explorer
- Close all InPrivate windows in Internet Explorer.
- Open a new InPrivate window in Internet Explorer (ctrl+shift+P).
- Go to Tools > F12 Developer Options > Network.
- Ensure Clear entries on navigate is switched off.
- Visit the page and complete the steps that trigger the issue.
- Choose the Network tab and select Export as HAR (Ctrl+S).
- Save the HAR file.
- Next remove any sensitive information from the file.
- Open the HAR file with a text editor of your choice.
- Search for all instances of "Password".
- Replace these values with a placeholder value such as "*****".
- Save the HAR file.
This article is copied and adapted from https://auth0.com/docs/troubleshoot/troubleshooting-tools/generate-and-analyze-har-files