About

A recording, not a measurement

Last updated 24 November 2026

A HAR file is what one browser wrote down while a page loaded. It is a witness statement, not a speed test: precise about what happened on that connection, silent about everything else.

How the file is read

The file is JSON with a log object and an entries list. The page reads it with the browser's own parser. If the JSON is malformed, the reader names the line and the column, because the parser's own message says what went wrong but not where. If the file is valid JSON but not a HAR, or a version other than 1.1 or 1.2, the page says that and stops rather than guessing.

Each entry becomes one request: its method and URL, the host and path, the status, the resource type, the transfer size and the decoded size, its recorded start and its duration. When Chrome's _resourceType is present it is trusted; otherwise the MIME type and the file extension decide whether something is a document, a script, a stylesheet, an image, a font, an XHR, a fetch, media or wasm.

The arithmetic

A HAR timing has seven fields: blocked, dns, connect, ssl, send, wait and receive. The connect figure already includes the SSL handshake, so the page subtracts ssl from connect before it draws them as two separate pieces. A negative value means the browser did not record that phase; it is treated as zero, and the original value is shown as not recorded in the detail panel. If the entry's own time is larger than the sum of its phases, the entry's time wins and the bar is scaled to it.

The load span is the distance from the earliest request start to the latest request end, not the page's onLoad value. Both are shown: the span is what the file can prove, onLoad is what the page reported. The two often differ, and the difference is usually work that started after the load event.

Naming the suspect

For each of the five slowest requests, the page finds the phase that took the largest share. Waiting means the server was slow to send its first byte. Download means the body was heavy for the wire. DNS, TCP and TLS mean the first connection cost more than it should. Queue means the request waited behind others. That is a description of the recording, not a verdict on the cause: a slow database and a slow reverse proxy both look like waiting.

What the masking does

The export makes a deep copy of the file in memory and replaces values in four places. Header names on a fixed list, including Authorization, Proxy-Authorization, Cookie, Set-Cookie, X-Api-Key and a group of vendor token headers, lose their value while keeping the scheme where there is one. Cookie values are replaced and their names and attributes are kept. Query parameters and JSON or form fields named access_token, token, api_key, secret, password, signature, session and their neighbours lose their value, in the URL, the query list and the request body. JSON response bodies are walked with the same rule.

It is a safety net, not a guarantee. A secret in a header with a private name, or in a free-text field called note, will not be recognised. Read the masked copy before you post it somewhere public.

Where it stops

Who made it

Pikkola Lab builds small tools that keep the work in the browser. This is tool No. 68. Write to hello@pikkola.com with a recording that reads badly, and say which row looks wrong.

Back to the studio

소개

측정이 아니라 기록입니다

최종 수정 2026년 11월 24일

HAR 파일은 페이지가 열리는 동안 브라우저 하나가 적어 둔 것입니다. 속도 측정이 아니라 목격자 진술에 가깝습니다. 그 연결에서 일어난 일은 정확하고, 나머지는 조용합니다.

파일을 읽는 방식

파일은 log 객체와 entries 목록을 가진 JSON입니다. 브라우저의 파서로 읽습니다. JSON이 깨져 있으면 몇 행 몇 열인지 알려 줍니다. 파서의 메시지는 무엇이 틀렸는지는 말하지만 어디인지는 말하지 않기 때문입니다. JSON이지만 HAR가 아니거나, 1.1과 1.2가 아닌 판이면 추측하지 않고 그렇다고 말한 뒤 멈춥니다.

항목 하나가 요청 하나가 됩니다. 메서드와 URL, 호스트와 경로, 상태, 리소스 타입, 전송 크기와 원본 크기, 기록된 시작 시각과 걸린 시간입니다. Chrome의 _resourceType이 있으면 그 값을 믿고, 없으면 MIME 타입과 확장자로 문서인지 스크립트인지 스타일시트인지 이미지인지 폰트인지 XHR인지 fetch인지 미디어인지 wasm인지 판단합니다.

산수

HAR의 타이밍에는 blocked, dns, connect, ssl, send, wait, receive 일곱 칸이 있습니다. connect에는 SSL 핸드셰이크가 이미 들어 있어서, 그리기 전에 ssl을 빼서 두 조각으로 나눕니다. 음수는 그 단계를 기록하지 않았다는 뜻이고 0으로 계산하며, 타이밍 패널에는 기록 없음으로 적습니다. 항목의 time이 단계 합보다 크면 time을 기준으로 삼고 막대도 거기에 맞춰 늘립니다.

로드 구간은 가장 이른 요청의 시작부터 가장 늦은 요청의 끝까지입니다. 페이지가 신고한 onLoad와는 다릅니다. 둘 다 보여 줍니다. 구간은 파일이 증명할 수 있는 값이고, onLoad는 페이지가 말한 값입니다. 둘이 다른 것은 보통 로드 이벤트 뒤에 시작한 일이 있다는 뜻입니다.

용의자에 이름 붙이기

느린 요청 다섯 건마다 가장 큰 몫을 차지한 단계를 찾습니다. 기다림이면 서버가 첫 바이트를 늦게 보낸 것이고, 다운로드면 본문이 회선에 비해 무거운 것입니다. DNS와 TCP, TLS는 첫 연결의 값이 예상보다 컸다는 뜻입니다. 대기는 다른 요청 뒤에 섰다는 뜻입니다. 이것은 기록에 대한 설명이지 원인에 대한 판결이 아닙니다. 느린 데이터베이스와 느린 리버스 프록시는 둘 다 기다림으로 보입니다.

가리기가 하는 일

내보내기는 메모리에서 파일을 깊게 복사하고 네 자리의 값을 바꿉니다. 정해진 목록의 헤더 이름, 예를 들어 Authorization, Proxy-Authorization, Cookie, Set-Cookie, X-Api-Key와 여러 업체의 토큰 헤더는 값을 지우되 방식(Bearer 같은)은 남깁니다. 쿠키는 값을 바꾸고 이름과 속성은 남깁니다. access_token, token, api_key, secret, password, signature, session 같은 이름의 쿼리 파라미터와 JSON, 폼 필드는 URL과 쿼리 목록, 요청 본문에서 값을 잃습니다. JSON 응답 본문도 같은 규칙으로 훑습니다.

안전망이지 보증은 아닙니다. 사내에서만 쓰는 이름의 헤더에 든 비밀이나 note라는 자유 입력 칸에 든 비밀은 알아보지 못합니다. 공개할 곳에 올리기 전에 가린 사본을 직접 읽어 보세요.

멈추는 곳

만든 곳

피콜라 랩은 작업을 브라우저 안에 두는 작은 도구를 만듭니다. 이것은 68호기입니다. 읽히지 않는 기록이 있으면 hello@pikkola.com으로 보내 주세요. 어느 줄이 이상한지 알려 주시면 됩니다.

스튜디오로 돌아가기

概要

測定ではなく、記録です

最終更新 2026年11月24日

HAR ファイルは、ページが開く間にブラウザが一つ書き残したものです。速度の測定ではなく、目撃者の証言に近い。その接続で起きたことは正確で、それ以外は静かです。

ファイルの読み方

ファイルは log オブジェクトと entries の一覧を持つ JSON です。ブラウザ自身のパーサーで読みます。JSON が壊れていれば、何行目の何文字目かを伝えます。パーサーの知らせは何が問題かを言いますが、どこかは言わないからです。JSON だが HAR ではない、または 1.1 と 1.2 以外の版なら、推測せずにそう言って止まります。

項目一つがリクエスト一つになります。メソッドと URL、ホストと経路、状態、種類、転送量と展開後の大きさ、記録された開始時刻と所要時間です。Chrome の _resourceType があればその値を信じ、なければ MIME タイプと拡張子で、文書かスクリプトかスタイルシートか画像かフォントか XHR か fetch かメディアか wasm かを決めます。

算数

HAR のタイミングには blocked、dns、connect、ssl、send、wait、receive の七つがあります。connect には SSL ハンドシェイクがすでに入っているので、描く前に ssl を引いて二つの部分に分けます。負の値はその段階を記録しなかったという意味で、0 として計算し、タイミングには記録なしと書きます。項目の time が段階の合計より大きければ time を基準にし、棒もそれに合わせます。

読み込み区間は、最も早いリクエストの開始から最も遅いリクエストの終わりまでです。ページが申告した onLoad とは違います。両方を見せます。区間はファイルが証明できる値で、onLoad はページが言った値です。二つが違うのは、普通は読み込みイベントの後に始まった仕事があるからです。

容疑者に名前を付ける

遅い五件それぞれで、最も大きな割合を占めた段階を探します。待機ならサーバーが最初のバイトを遅く送った。ダウンロードなら本文が回線に対して重い。DNS と TCP、TLS は最初の接続の代金が大きすぎた。待ちは他のリクエストの後ろに並んだという意味です。これは記録の説明で、原因の判決ではありません。遅いデータベースも遅いリバースプロキシも、どちらも待機に見えます。

伏せる処理がすること

書き出しはメモリでファイルを深く写し、四か所の値を変えます。決まった一覧のヘッダー名、たとえば Authorization、Proxy-Authorization、Cookie、Set-Cookie、X-Api-Key と各社のトークンヘッダーは値を消し、方式(Bearer など)は残します。クッキーは値を変え、名前と属性は残します。access_token、token、api_key、secret、password、signature、session などの名前のクエリと JSON、フォームの項目は、URL とクエリ一覧、要求本文で値を失います。JSON の応答本文も同じ規則でたどります。

安全網であって保証ではありません。社内だけで使う名前のヘッダーや、note という自由記入欄の秘密は見つけられません。公開する前に、伏せた写しを自分で読んでください。

止まる場所

作ったところ

Pikkola Lab は仕事をブラウザの中に置く小さな道具を作ります。これは 68 号機です。読めない記録があれば hello@pikkola.com まで。どの行がおかしいかを教えてください。

スタジオに戻る