Move and resize own window
Moves or resizes a popup the site opened; ignored for normal tabs.
In one line
Can move or resize only a popup window it opened itself
Moves or resizes a popup the site opened; ignored for normal tabs.
A site can reshape a popup it created, but the browser blocks changes to tabs and pre-existing windows, so scripts cannot yank your main window around or hide it off screen.
What it can and can't do
What the user does: You click a link that opens a popup or small window.
It can
- Move a popup it opened
- Resize a popup it opened
- Nudge a popup by a small amount
It cannot
- Move or resize a normal tab or your main window
- Move windows from other sites or apps
- Hide the popup from you
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 | 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 | win.moveTo(x, y); win.resizeTo(w, h); win.moveBy(dx, dy) |
| Browser compat keys | api.Window.moveToapi.Window.resizeToapi.Window.moveByapi.Window.resizeBy |
| 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 | Per window; applies once, no stored state |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Same rules in iframes: only a window the script opened can be moved or resized |
Typical flow
- Page opens a popup with window.open
- Script calls moveTo or resizeTo on the popup reference
- Browser applies it within limits
Data you get
Shape: none
No individual data fields. The signal is the access itself.
Technical limits
- Only windows opened by window.open are affected; main browser windows and tabs in a multi tab window ignore the calls
- Firefox disables the call when dom.disable_window_move_resize is set and for tabs; Chrome and Safari ignore it for tabs in a window with other tabs
- Size has a minimum of about 100 by 100 CSS px in major browsers
- The window cannot be moved so far that it leaves the screen
- Mobile browsers and Safari on iOS ignore the calls
The story
What it is
Moves or resizes a popup the site opened. It is ignored for your normal tabs.
For you
If a site opened a small popup, like a login box, it can move or resize that box. Your normal tabs and windows are never moved.
For makers
Makers use it to place sign in, payment and chat popups neatly. Browsers block it for ordinary tabs because old ads abused it to jump windows around.
Where you see it
| Type | Example | Apps |
|---|---|---|
| payments | A shop opens a payment window and centers it over the page. | None named |
| social | A site opens a small share or login window sized to fit. | None named |
| games | A browser game opens a chat or inventory popup and sizes it to fit. | None named |
| ads | In the past, pop up ads moved themselves around or ran off screen. Browsers now block that. | None named |
| security | A scam popup tries to resize to cover the whole screen and look like a system alert. | None named |
| productivity | A web app opens a floating tool palette and keeps it next to the main window. | None named |
Risks
- Popup tricks
- Mostly blocked now
What the platform says
- MDN: Window.moveTo. Documents how a script can move a window, with limits that stop it for normal tabs.
Good uses and abuse
Legitimate uses
- Legacy popup tools
- Helper or print windows
Known abuse
- Pop-under ads
- Chasing the person with windows (blocked in modern browsers)
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 1 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
- 2008-09, Chrome 1: Present from the first release; calls are ignored for tabs that share a window with other tabs
Related capabilities
Related
- Open popup or new window. Can open a new tab or window, but only right after you tap or click
- Window inner and outer size. Can see your browser window and visible page size, as they change
Sources
How well checked: Inferred from related behavior.