← back to blog

Cookies, sessions and the profile that betrays you

browser-profiles sessions storage antidetect

There are about eight places a website can leave something on your machine. Most people clear one and call the profile clean.

I found this out the expensive way. I restored a browser profile from a backup that was nine days old, opened it, and inside a minute the platform had forced a logout and a verification prompt, then done the same to the three other accounts sharing that group. Nothing about the fingerprint had changed. The proxy was the same line it had always been. The backup itself was the event.

That is the part of a profile nobody maintains: the storage layer. You configure it once during setup, it works, and then it silently drifts for months.

Count the drawers

Strip the vendor interface off any profile and what you have is a folder full of separate stores, each with its own rules:

  • The cookie jar, which is the one everyone pictures.
  • Local storage. A key and value store with no expiry, ever, unless something explicitly deletes it.
  • Session storage, which is the same idea scoped to a single tab and thrown away when the tab closes.
  • Indexed databases. Real structured databases kept per origin. This is where an antifraud script will park a device identifier next to a first-seen timestamp and a visit counter.
  • Service worker registrations. A site can install a script that outlives the tab, keeps running, intercepts later requests, and manages a cache of its own.
  • The Cache Storage API contents that service worker controls.
  • The ordinary HTTP cache, including per-file validation tokens.
  • Permission grants and per-site settings, which record every notification prompt you ever clicked.

And then, below all of that, the connection state: TLS session tickets that let a reconnect skip the full handshake, the HSTS list of domains your browser has promised to reach only over HTTPS, cached DNS answers, and certificates already validated. That layer routinely survives a cleanup people describe as thorough, because it does not live where site data lives.

If a site stashed the same identifier in local storage or an indexed database, deleting the cookie accomplishes nothing durable. The next page load reads the value back out and writes a fresh cookie carrying it. As far as the server is concerned you never left. This is a decade-old technique and it is not exotic.

The HTTP cache version is quieter. A server can attach a unique validation string to a cached file. Every subsequent freshness check on that file hands the string back to whoever wrote it. That is a cookie with no cookie, and it appears in no settings panel.

There is a second-order cost to the wipe as well. You now run a profile whose cookies are all dated today while its indexed databases claim it has existed since March. Computing that mismatch takes one line of script.

Clearing everything instead is also wrong, for reasons further down.

A session is a row on someone else’s server

The model that causes the most damage is thinking of a session as a string you hold. Hold it, you are in. Lose it, you sign in again.

What is actually happening is that the server keeps a record, and your cookie or token is a claim against that record. The server can change the record’s state at any time without notifying your browser.

A current setup usually splits this in two. There is a short-lived access token, often valid for minutes, and a longer-lived refresh token that trades itself for a new access token in the background while you sit reading a page.

Refresh is where the behaviour that matters lives. Many systems rotate the refresh token on every use, so each refresh retires the old value and issues a replacement. That old value is dead by design, immediately.

Plenty of them also watch for reuse. When a refresh token that has already been spent comes back a second time, the reasonable interpretation is that somebody copied it, and the safe response is to invalidate the entire chain of sessions descended from that token.

Which is precisely what my restore triggered.

What a stale restore replays

Nine days of normal use had put that profile through a few dozen refresh cycles. Each one retired the token before it. The snapshot on disk held the value from the start of that chain.

So the restored profile opened, presented a refresh token from nine days and dozens of rotations back, and the server behaved correctly. It read a replay, killed the family, and demanded that every related session prove itself again.

A fresh login would have been far quieter. Logins are an event every platform sees constantly and has an entire flow to handle. A replayed dead token is a security incident with an automated response attached.

The operational rule that came out of this: a restore costs you a login. Plan for it. Restore, expect to sign in, do it from the network that profile has always used, and change nothing else that day.

Sessions remember where they were created

A session record on the server side generally carries context from the moment it was issued. The network it came from, the rough location of that network, and signals about the browser that requested it. Some platforms go further and bind the token to those signals, so it only validates when the same story arrives with it.

This is why a session captured on one machine and loaded into a profile that reports a different machine gets challenged straight away. The token says one device. The connection carrying it says another. Detecting that requires no cleverness, only a comparison.

Worth stating outright: the only sessions worth moving are your own, between your own machines. There is a market in sessions lifted off other people’s accounts. That is account takeover, it is fraud, and this site has nothing to offer anyone doing it.

The profile that has been nowhere

The mirror-image failure is a profile scrubbed so hard it has no past at all.

Picture what a real person’s browser holds after two years. A few hundred cookies from sites they have completely forgotten visiting. Cached fonts from a news site. A service worker left behind by a webmail client they abandoned. Permission grants they clicked through in 2024 and never revisited. None of it relates to the account they are logging into, which is exactly the point. It is background noise and everybody carries it.

A profile that shows up empty every single time is describing a machine that has never been used for anything else. That is a rarer kind of user than people assume.

The obvious fix creates a new problem. Running a cold profile through 200 sites in ten minutes to manufacture a history produces an accumulation curve no human being generates. Real state builds up slowly, unevenly, with week-long gaps where the person was asleep, busy or on holiday.

The cheap version of getting this right is to keep the profile and use it. State accumulates by itself if you stop deleting it.

What I got wrong

For most of a year I treated backups as a remedy. Anything odd on a profile, a captcha appearing where there normally is not one, a login needing two attempts, and I would roll back to yesterday’s snapshot and carry on.

That reflex comes from running servers, where returning to a known good state is usually correct. Applied to a live session it is close to the worst available move. A snapshot is a stale state by definition, and the server has moved on while that file sat still. I caused more forced logouts by rolling back than I ever prevented, and I kept doing it for months while blaming the tooling.

The other long-running mistake was copying profile folders while the browser was still open. Those stores are transactional, with recent writes sitting in a write-ahead log that has not been folded into the main database yet. Copy the main file alone and you get a profile that is internally inconsistent. It presents as corruption a week later, which sends you back to a backup you never needed in the first place.

Rules I run on now

Close the profile before copying or exporting, and wait for the process to actually exit rather than for the window to vanish.

Keep the most recent snapshot, because profiles do genuinely corrupt. A disk that filled mid-write, a power cut, a sync client that grabbed a file while it was open.

Restore for corruption. Do not restore for suspicion. Those are different problems and only one of them has a backup-shaped answer.

Snapshot before any structural change, and snapshot again right after a clean login, so the newest copy is always the closest thing you have to what the server currently believes.

Never run one profile in two places at once. Two copies refreshing the same session against the same server is the exact pattern reuse detection was built to catch.

Put a readable date on every snapshot. I once lost twenty minutes working out which of four folders was current.

The ceiling on all of this

Clean, coherent, persistent storage removes contradictions. That is its entire contribution. It says nothing about how old an account is, what it does once it is inside, how quickly it clicks, or whether the activity was ever going to be tolerated in the first place.

I have watched profiles with immaculate storage hygiene die anyway, because the behaviour running on top of them was obviously scripted. This layer is a floor. A floor is not a building.

Which is the argument for treating a profile as furniture you own for a year rather than a container you fill and discard. Pin it to one network, open it on a rhythm, let it accumulate its own junk, back it up occasionally and restore it almost never. The disposable habit guarantees every identity you run is permanently new, and permanently new is the condition you were trying to get away from.

Full written reviews and the tested picks I actually trust are at Anti-Detect Review.

Get new guides and videos first — join the Telegram channel.

need infra for this today?