A HAR (HTTP Archive) file is a JSON-formatted archive file that contains information about the most recent network activity as recorded by your web browser. It tracks all the interactions, such as web requests and responses between a web browser and a website. The HAR file records each resource loaded by the browser, as well as the time it took to load each resource.
How to create a HAR file for Chrome
1. Open Google Chrome and go to the webpage where you are experiencing the problem.
2. Open the Developer Tools by pressing Ctrl+Shift+I on Windows or Cmd+Option+I on Mac.
3. Click on the Network tab.
4. Make sure the round button in the upper left corner is in red. If it’s grey, double-click it to begin recording the interactions.
5. Enable the Preserve log option to record all the web requests and responses.
6. Click the 'Record' (⚫) button to start recording
7. Reproduce the problem by repeating the steps.
8. Click the 'Export HAR' (↓) button to download and save the HAR file
How to Sanitize the HAR files
1. Start by visiting HAR File Sanitizer.
2. You will be prompted to upload your HAR file-
3. Once the file has loaded, you will see a list of cookie and header names, query string parameters, and MIME types that can be sanitized. Click to sanitize all cookie and header values.
4. Click on "Download Sanitized HAR" button.
5. In order to confirm that the values were redacted, please visit the HAR Analyzer tool.
6. To update the file and analyze it, please click on Choose Files-
7. Select a few requests and verify that in the right panel's "Response" and "Cookies" tabs, the values are shown as redacted. For example -