Inspect
Compare exchanges
Compare puts two exchanges next to each other and shows what changed: the request line, status, request and response headers, both bodies and the timing. Use it to find out why one call worked and the other didn't, or what changed between two sends of the same request.
Open the compare view
Select exactly two exchanges in Traffic: Ctrl/⌘-click the second one, or extend the
selection with Shift-click or Shift ↑ / Shift ↓. Then:
- click Compare in the details pane (or the Open side-by-side diff card below it),
- right-click the selection → Compare, or
- run Compare the two selected exchanges from the command palette (
Ctrl/⌘ K).
The older exchange (lower #id) is A, the newer one B. Swap A and B
(Alt/⌥ S) turns them around.
In Compose, after you send the same tab twice, Compare with the previous response (in the response header) compares the previous send (A) with the latest one (B). See Compose.
What you see
The header shows both exchanges (method, status, URL, #id, time, duration, response size and
source) and a summary such as 3 of 7 sections differ, with a chip for each differing section
and its added and removed line counts. Click a chip to jump to that section.
Below come seven sections. Sections that differ start open, identical ones start collapsed and say Identical. Expand all sections / Collapse all sections toggles them together.
| Section | Compared as |
|---|---|
| Request line | METHOD URL HTTP-version, then each query parameter on its own line, so a changed parameter shows up as one changed line. |
| Status | HTTP/2 200 OK, or the error (Failed: with its kind and message), or (no response yet). |
| Request headers | One name: value line per header, names lower-cased and sorted (HTTP/2 pseudo-headers first). |
| Response headers | The same. |
| Request body | The decoded body, pretty-printed (see below). |
| Response body | The same. |
| Timing | A table of phases, see timing. |
Because headers are normalised, differences in header case or order don't count as changes. Duplicate headers keep their relative order.
If a rule or breakpoint changed an exchange, Compare uses the modified version: the request as Akev forwarded it and the response as the client received it.
Bodies
Bodies are decoded (gzip, Brotli and so on removed) and shown the way the body viewer formats them, then diffed line by line:
- JSON is pretty-printed with two-space indentation. Keys keep their original order, so the same object with its keys in another order shows as changed lines.
- XML, HTML, CSS, JavaScript, GraphQL, form data and server-sent events are formatted the way the body viewer shows them. Other text is compared as it is.
- Protobuf, gRPC, gRPC-Web, MessagePack and CBOR are compared as their decoded JSON form (see protobuf).
- Binary bodies (images, archives, unknown data) are compared by type and size only, as a
line like
<12.4 KB image body>. A note says so.
If a body can't be loaded, it's compared as empty and a note says so. Body text beyond 8 MB is cut off, as in the body viewer.
Reading the diff
Each section shows a line diff:
- Split shows A and B side by side; Unified shows one column with removed and added
lines. Switch with the Split / Unified control or
Alt/⌥ L; Akev remembers your choice. - Changed lines highlight the words that changed, and the text keeps its syntax colouring.
- Long unchanged stretches fold away, keeping three lines of context around each change. Click Show N unchanged lines to unfold one.
- Ignore whitespace (
Alt/⌥ W) compares lines without leading and trailing whitespace, with runs of spaces inside a line treated as one. Turn it off again with Compare whitespace. - With a diff focused,
Alt/⌥ ↓andAlt/⌥ ↑jump to the next and previous change.
Timing
The Timing section lists each phase for A and B, with bars and the difference (B − A):
Total, DNS lookup, Connect, TLS handshake, Request sent,
Waiting (TTFB) and Content download. A phase neither exchange has is left out (DNS and
TLS when both reused a connection, for example); one that only one side has shows — for the
other. Differences under half a millisecond count as same; slower and faster phases are
coloured.
Limits
- Compare takes exactly two exchanges, and both must still be in memory. One that was deleted or evicted can't be compared (This exchange no longer exists).
- An exchange that is still running is compared as it is now, and the view updates when it completes.
- It's a text diff of the formatted bodies, not a structural JSON comparison: there is no option to ignore key order.
- Very large inputs are diffed in the background, so the summary may show Comparing… for a moment. When a long stretch differs too much to diff quickly, Akev shows it as replaced as a whole instead of searching for the smallest diff, and word highlighting is skipped on lines over 4,000 characters.