Skip to Content
Platform.Ontology

Navigate or redirect the tab

Sends the current tab to a different page by script, meta refresh or server redirect.

Does something on your deviceThings a page can doWindows and navigationWeb browsersWhile you use it

In one line

Can send your current tab to another page by itself

Sends the current tab to a different page by script, meta refresh or server redirect.

A site can move the person to another URL at any time, including after they click something. Cross-origin iframes get tighter limits, which is why ad frames cannot hijack the whole tab.

What it can and can't do

What the user does: Nothing. It happens on load, after a timer, or when you submit a form.

It can

  • Send you to a new page after a login, a payment or a link
  • Move you from an old address to a new one
  • Open a different page in the same tab through a redirect

It cannot

  • Send you away from a page you never opened, such as a page inside someone else's frame, in most browsers
  • Skip the browser's warning for a risky site
  • Stop you using Back; the earlier page stays in history

How it differs between platforms: Chrome, Safari and Firefox all stop most hidden redirects from embedded frames, but how strict they are differs.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported12008-12-11None
EdgeSupported122015-07-29None
FirefoxSupported12004-11-09None
SafariSupported32007-10-26None
Safari on iPhoneSupported12007-06-29All iOS browsers use WebKit
Chrome on AndroidSupported182012-06-27None
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APIlocation.href / assign() / replace(); <meta http-equiv=refresh>; HTTP 301/302/303/307/308; top.location from an iframe
Browser compat keysapi.Location.assign
api.Location.replace
How access is grantednone
What the user seesNone (no browser prompt)
Needs a secure context (HTTPS)No
Needs a user gestureNo
Activationnone
How long it lastsOne-shot; no stored state
How to take it backNothing to revoke (no permission is stored)
Inside an iframeCross-origin iframe may navigate top only with user activation (sandbox allow-top-navigation-by-user-activation) or allow-top-navigation

Typical flow

  1. Script runs location.assign or sets location.href
  2. Browser starts navigation unless blocked
  3. beforeunload may ask the person to stay

Data you get

Shape: none

No individual data fields. The signal is the access itself.

Technical limits

  • Same-frame navigation needs no activation or prompt
  • Cross-origin iframe navigating the top frame is blocked without user activation (Chrome 64 framebusting intervention; sandboxed frames need allow-top-navigation*)
  • Navigating to data: or blob: URLs in the top frame by script is blocked in Chrome 60 and Firefox 59 for data:
  • Browsers cap redirect chains (Chrome and Firefox stop after 20 redirects)
  • Navigations flooded in a loop are throttled (Chrome IPC flooding protection, Safari 100 per 30 s)

The story

What it is

A page can send your tab to a different address by script, redirect or timer.

For you

Most of the time you click a link and arrive. Sometimes you land on a different page than you clicked, for example after a login or a shortened link.

For makers

Redirects are the plumbing of the web: login flows, short links, regional sites. They also power click tracking, because the hop through an ad server lets it count the click.

Where you see it

TypeExampleApps
adsA tap on an ad goes through a tracking server that counts the click, then forwards you to the advertiser.Google Ads, Meta Ads
bankingYou are sent to your bank, then to an identity page, then back with a signed in session.None named
securityA phishing mail link bounces you through several sites to hide the real destination.None named
shoppingA short link from a message expands into a long product URL with a discount code.bit.ly
gamesA browser game portal redirects you to the game's own site on a different domain.Poki, CrazyGames
travelA booking site sends you to a payment partner and then back to confirm your trip.Booking.com

Risks

  • Hidden destinations
  • Redirect chains

Good uses and abuse

Legitimate uses

  • Login redirects
  • A/B test routing
  • Locale redirects

Known abuse

  • Malvertising redirects
  • Forced redirects to scam pages
  • Redirect chains used for bounce tracking

Scores

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility5 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2017-06, Chrome 60: Block renderer-initiated top-level navigation to data: URLs
  • 2018-01, Chrome 64: Cross-origin iframe redirects of the top frame need user activation
  • 2019-09, Chrome 76: sandbox allow-top-navigation-by-user-activation supported broadly

Sources

How well checked: Based on official documentation.

On this page