How do I generate and sanitize a HAR file?

Modified on Mon, 05 Feb 2024 at 11:11 AM

If you have been asked to generate a HAR file by Rublon Support, here’s how to do it.


A HAR file is a useful tool for troubleshooting issues that occur in a browser. It records the network activity and interactions between the browser and the web server. However, a HAR file may also contain sensitive information, such as cookies or authentication tokens, that could allow someone to impersonate your account. Therefore, you need to sanitize the HAR file before sending it to Rublon Support.


Generate a HAR file

The following steps will guide you on how to generate a HAR file on all popular browsers.


Generate a HAR file in Chrome

1. Open the developer menu on your browser by pressing F12.


2. Click the Network tab at the top of the menu.


3. Make sure the red light is on at the left side of the menu. This means the network activity is being recorded.


4. Check the boxes for Preserve log and Disable cache. This will ensure that the browser keeps the data across different pages.



5. Reproduce the issue or error that you want to report to Rublon Support.


6. Click Export HAR…, give the file a descriptive name (for example, your company name), and save it.



Generate a HAR file in Microsoft Edge

1. Open the Microsoft Edge Developer Tools on your browser by pressing F12.


2. Click the Network tab at the top of the menu.


3. Make sure the red light is on at the left side of the menu. This means the network activity is being recorded.


4. Check the boxes for Preserve log and Disable cache. This will ensure that the browser keeps the data across different pages.



5. Reproduce the issue or error that you want to report to Rublon Support.


6. Click Export HAR…, give the file a descriptive name (like your company name), and save it.



Generate a HAR file in Firefox

1. Open the developer menu on your browser by pressing F12.


2. Click the Network tab at the top of the menu.


3. Click the Settings (cog) icon, and then select Persist Logs.



5. Reproduce the issue or error that you want to report to Rublon Support.


6. Click the Settings (cog) icon and then select Save All as HAR. Give the file a descriptive name (for example, your company name), and save it.


Generate a HAR file in Safari

1. Enable the developer tools in Safari: Safari → Preferences → Advanced and check Show Develop menu in menu bar.


2. Click Develop and then click Show Web Inspector.


3. Click the Network tab at the top of the menu and then click Persist Logs.


4. Reproduce the issue or error that you want to report to Rublon Support.


5. Click Export and save the file.


Sanitize the HAR file

1. Open the HAR file with a text editor of your choice.


2. Use the find function of the text editor to search for the following entry:


"name": "Authorization"


3. Delete the whole entry, including the opening and closing brackets, and the comma after it. For example:


{

"name": "Authorization"

“value”: “fReg4$4G4g…”

},


4. Repeat the search until you delete all occurrences of the "name": "Authorization" entry.


5. Now use the find function of the text editor to search for the following entry:


"name": "origin"


6. Delete the whole entry, including the opening and closing brackets, and the comma after it. For example:


{

"name": "origin",

"value": "https://..."

},


7. Repeat the search until you delete all occurrences of the "name": "origin" entry.


8. Save the changes you made to the HAR file and attach the sanitized HAR file to your Rublon Support ticket.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article