Open popup or new window
Opens a new tab or popup window, but only right after a click or tap.
In one line
Can open a new tab or window, but only right after you tap or click
Opens a new tab or popup window, but only right after a click or tap.
A site can put another page in front of the person (ads, login flows, payment pages). Popup blockers decide whether it happens, so it is the main way a site can steer attention to a second origin.
What it can and can't do
What the user does: You tap a link, a button, or Share, Print or Open in new tab.
It can
- Open a new tab or small window after a tap or click
- Open a sign in window for a login or a payment
- Open a link in a new tab you can close
It cannot
- Open a window with no tap or click, which browsers block by default
- Open lots of windows from one tap in most cases
- Control a window that belongs to a different site
- Hide the address bar of the new window in modern browsers
How it differs between platforms: iPhone Safari is a little stricter about which taps count.
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 | 1 | 2003-06-23 | None |
| Safari on iPhone | Partial | 1 | 2007-06-29 | Partial implementation per MDN BCD |
| 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 | window.open(url, target, features); <a target=_blank> |
| Browser compat keys | api.Window.open |
| How access is granted | gesture |
| What the user sees | No prompt (needs a click, tap or keypress) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | Yes |
| Activation | transient |
| How long it lasts | Per window; users can allow pop-ups per site (Chrome Pop-ups and redirects setting, Firefox exceptions, Safari per-site setting) |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Needs sandbox allow-popups (and allow-popups-to-escape-sandbox for unsandboxed children) |
Typical flow
- Person clicks or taps
- Handler calls window.open within about 5 s of the click
- Browser opens window or shows blocked-popup icon
Data you get
Shape: none
No individual data fields. The signal is the access itself.
Technical limits
- Blocked without transient user activation (Chrome, Safari, Firefox all block popups outside input handlers)
- Transient activation lasts about 5 s in Chrome and Firefox (dom.user_activation.transient.timeout = 5000 ms); Safari uses a much shorter window (about 1 s)
- window.open consumes the activation in Chrome and Safari, so a second popup in the same click is blocked
- Firefox allows up to dom.popup_maximum (default 20) popups from one event
- target=_blank and window.open imply noopener for links (Chrome 88, Firefox 79, Safari 12.1)
- Popup features width and height are clamped to a minimum of 100 CSS px; position cannot be placed off screen
The story
What it is
After a click, a page can open a new tab or small window.
For you
You click a link and a new tab opens, or you sign in with Google and a small window appears. Without a click, the browser blocks the pop up.
For makers
Makers use pop ups for sign in windows, payment confirmations and help chats. The click rule exists because pop up ads were once everywhere.
Where you see it
| Type | Example | Apps |
|---|---|---|
| social | Clicking 'Sign in with Google' opens a small window to approve, then closes. | Spotify, Canva |
| payments | A PayPal button opens a small window to confirm payment, then returns you to the shop. | PayPal |
| ads | A shady ad site tries to open a new tab with every click anywhere on the page. | None named |
| games | A browser game portal opens the leaderboard in a pop up. | None named |
| live | A streamer's chat is popped out to a separate window so it can sit on a second monitor. | Twitch |
| banking | A bank opens a secure help chat in a small window. | None named |
Risks
- Pop under ads
- Fake sign in windows
Good uses and abuse
Legitimate uses
- OAuth sign in windows
- Payment 3-D Secure windows
- Print or preview windows
Known abuse
- Pop-under ads
- Phishing windows that mimic browser chrome
- Tab-nabbing via window.opener (mitigated by noopener)
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 | 1 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2012, Chrome 21: Popups opened from user clicks only; blocker icon in the address bar
- 2018-01, Chrome 64: Popups in cross-origin iframes limited; abusive redirect and popup interventions
- 2020-12, Chrome 88: Anchors with target=_blank get implicit rel=noopener
- 2021-03, Firefox 79: Implicit noopener for target=_blank
- 2023-01, Chrome 109: popup=true feature and window.open consumes transient activation across browsers (HTML spec)
Related capabilities
Related
- Close a window from script. Can close windows it opened itself, but not your regular tabs
- Focus and window raise. Can move the cursor between boxes on its page, but can't pull its window forward
Sources
How well checked: Based on official documentation.