scalpel@labs: ~/glossary/per-tab-history.mdx5 sections

Per-Tab Redirect History

Per-tab history is the extension's rolling record of the last 20 navigations in each tab, browsable from the popup's history strip. Selecting an entry re-renders that chain read-only, exactly as it was captured.

extension: Scalpel Redirectsupdated: 2026-08-14read_time: 3 min
less per-tab-history.mdx

Why it matters

The oldest complaint about redirect inspectors is checking too late: the interesting chain fired, another navigation happened, and the evidence is gone. History removes the race. The chain from three navigations ago is still there, with its headers and hints intact. It is session-scoped by design: kept in memory-only storage, capped per tab, and cleared when the browser closes, so the record exists for you and then stops existing.

This matters for incident diagnosis. A user reports "something weird happened to my redirect," but you were not watching. With history, you can ask them to reproduce it once, then calmly read the chain from history on your own machine.

How it works

On every navigation, the extension records the full chain: all hops, headers, hints, and the verdict. This record is stored in chrome.storage.session, which is per-tab, per-session, and cleared on browser close.

Each tab keeps up to 20 entries, the oldest automatically discarded when a new one arrives. The history strip in the popup lists all available entries for that tab as "HH:MM:SS - final URL (status code)". Select any entry to re-render that chain read-only, marked with a history badge so you know it is not the current live chain.

The caps (20 per tab, typically 50 tabs max) are deliberately small to keep memory use bounded. This is not a full browsing log; it is a scratch pad for the current session.

What does not matter

History is not persisted. Close the browser and the entire history is gone. This is intentional: the extension does not want to keep a long-term record of your browsing. History is a session aid, not an archive.

A historical entry cannot be edited or exported directly, but you can screenshot it, copy the verdict, or mentally note the findings. If you need to preserve the record, record it again (navigate to that page again and capture it live) or screenshot the history entry.

History entries are read-only. You cannot mutate or delete a single entry; closing the tab or browser clears it. This keeps history honest: an entry is a snapshot, and you cannot accidentally change it after the fact.

Code example

History strip in the popup showing four recent navigations:

14:23:45 - example.com (200) ← current
14:12:33 - example.com/old (301→200)
14:05:12 - staging.example.com (302→200)
13:50:22 - example.com (loop)

Selecting the third entry (staging.example.com) re-renders:

Redirect Chain (from history at 14:05:12)

1. GET https://staging.example.com
   → 302 Found
   → Location: https://staging.example.com/redirect

2. GET https://staging.example.com/redirect
   → 200 OK

A read-only view with the verdict "Temporary redirect during staging: normal behaviour" and a [history] badge so you know this is a replay, not a live fetch.

Workflow for incident diagnosis:

User: "I got stuck in a redirect loop yesterday."
You: "Can you hit that URL again for me? I am watching."
User: [refreshes page]
You: "Got it, loop detected. Let me check the history to see what happened the first time."
[Select the historical entry from their report time]
You: "Aha, the loop was /a → /b → /a. It has been fixed now."

How Scalpel shows it

The history strip appears in the popup below the current chain. Each entry shows a timestamp, the final URL, and the final status code or verdict (e.g., "loop", "error"). Click any entry to switch to read-only mode and inspect that chain. A [history] badge marks it as a replay. Navigate to a fresh page in that tab to clear the history strip and re-populate it with new entries.

The rolling 20-entry limit means very active tabs will have a shorter history window. If you need to keep a record, export the current chain (if the extension has an export feature) or take a screenshot before the history evicts it.

Sources