Navigate or redirect the tab
Sends the current tab to a different page by script, meta refresh or server redirect.
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
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 1 | 2008-12-11 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 1 | 2004-11-09 | None |
| Safari | Supported | 3 | 2007-10-26 | None |
| Safari on iPhone | Supported | 1 | 2007-06-29 | All iOS browsers use WebKit |
| Chrome on Android | Supported | 18 | 2012-06-27 | None |
| Samsung Internet | Supported | 1.0 | 2013-04-27 | None |
How a site asks for it
| API | location.href / assign() / replace(); <meta http-equiv=refresh>; HTTP 301/302/303/307/308; top.location from an iframe |
| Browser compat keys | api.Location.assignapi.Location.replace |
| How access is granted | none |
| What the user sees | None (no browser prompt) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| Activation | none |
| How long it lasts | One-shot; no stored state |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Cross-origin iframe may navigate top only with user activation (sandbox allow-top-navigation-by-user-activation) or allow-top-navigation |
Typical flow
- Script runs location.assign or sets location.href
- Browser starts navigation unless blocked
- 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
| Type | Example | Apps |
|---|---|---|
| ads | A tap on an ad goes through a tracking server that counts the click, then forwards you to the advertiser. | Google Ads, Meta Ads |
| banking | You are sent to your bank, then to an identity page, then back with a signed in session. | None named |
| security | A phishing mail link bounces you through several sites to hide the real destination. | None named |
| shopping | A short link from a message expands into a long product URL with a discount code. | bit.ly |
| games | A browser game portal redirects you to the game's own site on a different domain. | Poki, CrazyGames |
| travel | A 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
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 5 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough 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
Related capabilities
Related
- Push history entries (back button limits). Can add extra Back button steps, but browsers skip steps made without a tap
Sources
How well checked: Based on official documentation.