Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pop-up ad
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Pop-under ad technology==== A pop-under ad involves two JavaScript functions introduced in 1995 with the Netscape 2.0b3 browser. Modern web publishers and advertisers use it to create a window in front of the user's screen, load an advertisement, and then send it behind the screen. <syntaxhighlight lang="javascript"> // create a new window in front of the current site window.open(URL, windowName[, windowFeatures]); // push the loaded advertisement back behind the browser window.focus(); </syntaxhighlight> Most modern browsers allow <code>window.open</code> to execute only if it was called by a user interaction (e.g., a mouse click) [[event handler]]. Any non-interactive calls (timer callback, load events, etc.) to <code>window.open</code> result in the new window being blocked. To bypass this restriction, most pop-under ads trigger on a mouse click event listener attached directly to the document or the document's body. This enables catching all mouse click events that were not consumed by other click event handlers, and calling <code>window.open</code> without being blocked. For example, when the user selects a text, the mouse click triggers the mouse click handler attached to the document and a pop-under opens using the above code. Other techniques to bypass the <code>window.open</code> call restriction do so by "hijacking" mouse clicks.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)