Skip to content

Commit 3a45453

Browse files
committed
Added new documentation page to show users how to export a HAR file
1 parent faa9dcf commit 3a45453

1 file changed

Lines changed: 69 additions & 0 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: "Export HAR Files for Analysis"
3+
description: Documentation for creating HAR files and why they are used for disgnostics
4+
date: 2026-01-28T08:03:00+02:00
5+
sidebar:
6+
label: "Export HAR Files"
7+
order: 16
8+
---
9+
10+
[HTTP Archive (HAR)](<https://en.wikipedia.org/wiki/HAR_(file_format)>) files are logs of network interactions made by a web browser. They contain headers, request bodies, response payloads, and even sentitive information like cookie values sent and received for each interaction.
11+
12+
:::caution[Do not share sensitive information]
13+
Before sharing any HAR files that contain sensitive values for diagnosing, you can sanitize that data by following the [steps below](#sanitize-a-har-file).
14+
:::
15+
16+
## Generating a HAR file
17+
18+
Generating a HAR file involves steps using your web browser and its associated developer tools. The browser-specific steps outlined below are all similar to each other. Other browsers will have similar steps.
19+
20+
### HAR File Considerations
21+
22+
* Consider using an incognito window of your browser. If you do, close all browser incognito instances you may have open and open a new one before creating the HAR file to ensure the cache is cleared.
23+
* Preserve the log across page navigations
24+
* If you are navigating to different pages (ex: logging in to a site with OAuth redirects), then any network calls made before the last redirect will be lost. Preserving the logs across page navigations aids in diagnosing issues. The below steps include instructions to preserve network logs while navigating across multiple pages.
25+
* Generate HAR files with sensitive data
26+
* It is helpful to know that certain fields are have been set, but not necessarily the actual value. Some browsers will exclude sensitive data in HAR file exports by default. The below steps include instructions to enable sensitive data in HAR file exports for browsers that do not include it by default.
27+
28+
### Google Chrome
29+
30+
1. Open the browser dev tools <https://developer.chrome.com/docs/devtools/open>.
31+
1. In the dev tools, click on the Settings icon. Under the Network category, enable "Allow to generate HAR with sensitive data".
32+
1. In the dev tools, navigate to the Network tab and enable the "Preserve log" checkbox.
33+
1. In the browser, visit the page(s) and perform the steps that trigger the issue.
34+
1. In the Network tab of the dev tools, click the down arrow and select the "Export HAR (with sensitive data)..." option to export the HAR file and save it locally.
35+
36+
### Safari
37+
38+
1. Enable the Web Inspector, and open it <https://developer.apple.com/documentation/safari-developer-tools/enabling-developer-features>.
39+
1. In the Web Inspector in the Developer menu, navigate to the Network tab. Click the "Filter" button and enable "Preserve Log".
40+
1. In the browser, visit the page(s) and perform the steps that trigger the issue.
41+
1. In the Web Inspector, click "Export" to export the HAR file and save it locally.
42+
43+
### Firefox
44+
45+
1. Open the browser dev tools <https://firefox-source-docs.mozilla.org/devtools-user>.
46+
1. In the dev tools, navigate to the Network tab, click the Network Settings icon, and enable "Persist Logs".
47+
1. In the browser, visit the page(s) and perform the steps that trigger the issue.
48+
1. In the Network tab of the dev tools, click the Network Settings icon, and select "Save All As Har" to save it locally.
49+
50+
### Microsoft Edge
51+
52+
1. Open the browser dev tools <https://learn.microsoft.com/en-us/microsoft-edge/devtools/overview>.
53+
1. In the dev tools, click on the ellipsis icon, then select "Settings". Under the Network category, enable "Allow to generate HAR with sensitive data".
54+
1. In the dev tools, navigate to the Network tab and enable the "Preserve log" checkbox.
55+
1. In the browser, visit the page(s) and perform the steps that trigger the issue.
56+
1. In the Network tab of the dev tools, click the down arrow and select the "Export HAR (with sensitive data)..." option to export the HAR file and save it locally.
57+
58+
### Sanitize a HAR file
59+
60+
Before sharing your HAR file with anyone you should remove any sensitive data. You can do this manually by opening the HAR file with any JSON text editor and removing the sensitive data. We recommend replacing data with a placeholder instead of deleting the entry. When diagnosing issues, it's helpful to know if a field was set or not.
61+
62+
### Practice
63+
64+
If you would like to practice with a small sample, you can login to the Duende Demo Server and generate a HAR file from those interactions.
65+
66+
1. In your browser, navigate to <https://demo.duendesoftware.com/Account/Login>.
67+
1. With your browser and dev tools open, the log being preserved, and the ability to export a HAR file with sensitive data, login to the site using one of the built-in users.
68+
1. Export the HAR file with sensitive data.
69+
1. Explore the HAR file JSON with a text editor.

0 commit comments

Comments
 (0)