Skip to Content
Platform.Ontology

Move and resize own window

Moves or resizes a popup the site opened; ignored for normal tabs.

Does something on your deviceScreen and windowsWindows and navigationWeb browsersWhile you use it

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

BrowserStatusFirst versionReleasedNote
ChromeSupported12008-12-11None
EdgeSupported122015-07-29None
FirefoxSupported12004-11-09None
SafariSupported12003-06-23None
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

APIwin.moveTo(x, y); win.resizeTo(w, h); win.moveBy(dx, dy)
Browser compat keysapi.Window.moveTo
api.Window.resizeTo
api.Window.moveBy
api.Window.resizeBy
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 lastsPer window; applies once, no stored state
How to take it backNothing to revoke (no permission is stored)
Inside an iframeSame rules in iframes: only a window the script opened can be moved or resized

Typical flow

  1. Page opens a popup with window.open
  2. Script calls moveTo or resizeTo on the popup reference
  3. 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

TypeExampleApps
paymentsA shop opens a payment window and centers it over the page.None named
socialA site opens a small share or login window sized to fit.None named
gamesA browser game opens a chat or inventory popup and sizes it to fit.None named
adsIn the past, pop up ads moved themselves around or ran off screen. Browsers now block that.None named
securityA scam popup tries to resize to cover the whole screen and look like a system alert.None named
productivityA 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

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility1 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

  • 2008-09, Chrome 1: Present from the first release; calls are ignored for tabs that share a window with other tabs

Sources

How well checked: Inferred from related behavior.

On this page