---
title: "Referer header: how can a site tell how a tab was opened?"
description: "What the Referer and Sec-Fetch-Site headers tell a site about how an agent opened a page, measured for a created tab and a middle-click in Chromium 150."
canonical: "https://scalebrowser.net/blog/referer-header"
last_modified: "2026-11-24"
published: "2026-11-24"
author: "davide"
category: "detection"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://scalebrowser.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Referer header: how can a site tell how a tab was opened?

> What the Referer and Sec-Fetch-Site headers tell a site about how an agent opened a page, measured for a created tab and a middle-click in Chromium 150.

An agent that needs the third page of a search result, or the settings page behind a login, usually knows its address and opens it directly. A person almost never does. They land on a start page, click a link, and sometimes open that link in a new tab. The difference is not visible in the page, but it is written into the request that fetched it, and a site's server reads it before the page has drawn anything.

## What is the Referer header?

The Referer header is an HTTP request header that carries the address of the page a request came from. MDN's [Referer reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referer) puts it plainly: "When you click a link, the `Referer` contains the address of the page that includes the link." The name is a misspelling of "referrer" that stuck, and the matching page property is spelled `document.referrer`. How much of the address travels is set by the referrer policy, and the default in current browsers is `strict-origin-when-cross-origin`, which MDN's [Referrer-Policy page](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy) describes as follows.

| Request | Referer sent under the default policy |
| --- | --- |
| same origin, `https://example.com/page` to `https://example.com/other` | the full address with path and query |
| cross origin over HTTPS, to `https://mozilla.org` | the origin only, `https://example.com/` |
| HTTPS to plain HTTP | no Referer at all |

A second header, `Sec-Fetch-Site`, describes the same relationship as a single word, and it is sent even when the Referer is not.

## What does the Referer header reveal about automation?

The Referer header reveals where a visit came from, and in particular whether it came from anywhere at all. MDN's [Sec-Fetch-Site reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Sec-Fetch-Site) defines the value `none` as "a user-originated operation", with the examples "entering a URL into the address bar, opening a bookmark, or dragging-and-dropping a file into the browser window".

A visit to a home page with `none` is ordinary. A visit to the fourth page of a checkout, or to a product deep in a catalogue, with no Referer and `none` says the address was typed or bookmarked. People do that for a deep page now and then; a script that iterates over a list of addresses does it on every request. One such request proves nothing; a session made of nothing else is a pattern.

## How can a site tell how a browser tab was opened?

A site can tell how a tab was opened from two request headers and from whether the new tab starts in front. On 10 August 2026 we opened the same same-origin link in two ways, once as a tab created over the Chrome DevTools Protocol and once with a middle-click on the link. The test page ran its own server so that it could record the headers the browser sent.

| Way of opening | Referer | Sec-Fetch-Site | New tab | What a person did |
| --- | --- | --- | --- | --- |
| tab created over the DevTools Protocol with the link's address | none | `none` | in front | typed the address into a new tab |
| middle-click on the link | the linking page | `same-origin` | in the background | opened the link in a new tab |

*Source: Scalebrowser tab bench, our 150 engine and vanilla Chromium 150.0.7871.124, headless and headed, 10 August 2026*

![Two rows: a tab created over CDP, in blue, arrives like a typed address with Referer none, Sec-Fetch-Site none and the tab in front; a middle-click on the link sends the linking page as Referer, Sec-Fetch-Site same-origin, and opens in the background.](/blog/referer-header/two-ways-to-open.png "A tab created over the DevTools Protocol arrives with no Referer and Sec-Fetch-Site none. A middle-click on the same link sends the linking page and same-origin and opens the tab in the background.")

Both engines answered the same way in both modes, so this is how Chromium behaves, not something one build adds. The first row is not wrong on its own: people do type addresses. It is wrong as a way of following a link the page shows, because the site knows the link exists and sees it arrive as if nobody had clicked it.

### Can a page or a script change these headers?

No, a page cannot change either header, because both are forbidden request headers: MDN lists `Sec-Fetch-Site` as forbidden because of its `Sec-` prefix, and `Referer` as forbidden too. A script in the page can only choose a stricter referrer policy. A client outside the browser, such as a plain HTTP library, can send any header it likes, which is exactly why a site treats a real browser's headers as the more reliable account of how a visit happened.

## Why do headers before the page runs matter?

Headers before the page runs matter because they reach the server with the navigation request itself, ahead of any script, so nothing injected into the page can change what they already said. A site does not need a fingerprinting script to read them; they are in its access log. These are the [headers before the page runs](/blog/bot-detection), next to the TLS handshake and the header order, and they are read on every request whether or not the page ever executes. A defence that sees a run of deep pages, each opened from nowhere, has a signal before it has asked the browser a single question. A reading that needs a script, such as the list of speech synthesis voices, is covered in speech synthesis voices.

Scalebrowser runs real browser profiles on your own PC: your AI agent drives them over MCP and signs in without ever seeing a password.

## How should an agent open pages?

An agent should open pages the way the person it acts for would, because the headers then describe a visit that happens every day. Four rules follow from the table above:

1. **Type an address only where a person would.** The first page of a task, a bookmark-like start page or a login page are ordinary with `Sec-Fetch-Site: none`.
2. **Click the links the page shows.** A click carries the linking page as Referer and the relationship as `same-origin` or `same-site`.
3. **Middle-click to open a link in a new tab.** The tab opens in the background with the referrer, as it does for a person.
4. **Bring a tab to the front before working in it.** In the same bench, a tab that was only attached reported `visibilityState: "hidden"` and drew 0 frames per second, and nobody types into a tab they cannot see.

Scalebrowser's navigation tool follows these rules: it tells the agent to middle-click a link the page shows rather than open its address, and every change of tab brings the new one to the front first. The [tool reference](/docs/agents/tools) lists both tools with their options.
