This page uses different techniques to test your popup blocker add-on/plugin. Currently, there are more than 20 methods designed to test the effectiveness of a popup blocker. Simply click on the buttons below to see if your popup blocker can block the generated popup. Each button has a description of the underlying logic. Please read descriptions before clicking on each button.
... document.write ... | |
---|---|
Open a new about:blank popup window and control the document body from parent's context (complex example) | |
Open a new about:blank popup window and control the document body from parent's context (simple example) | |
Redirect to example.com using window.open method | |
... window.open ... | |
Open a new popup tab using window.open(...) method | |
Same as test #2.1 test, but uses a pre-defined pointer for window.open(...) to prevent dynamic object overwrites | |
Open a new popup window and pass several arguments to it | |
Open a popup using a relative link | |
Open a popup using reference to the original window on DOM creation (prepend) | |
Open a popup using reference to the original window on DOM creation (append) | |
Open a popup using reference to the original window on DOM creation (after) | |
Open a popup using reference to the original window on DOM creation (before) | |
Open a popup using reference to the original window on DOM creation (appendChild) | |
Open a popup using reference to the original window on DOM creation (insertBefore) | |
Open a popup using reference to the original window on DOM creation (insertAdjacentElement) | |
Open a popup using reference to the original window on DOM creation (insertAdjacentHTML) | |
Open a popup using reference to the original window on DOM creation (innerHTML) | |
Open a popup using reference to the original window on DOM creation (replaceChild) | |
Open a popup using reference to the original window on DOM creation (document.write) | |
Open a popup using reference to the original window on DOM creation (immediate access with contentWindow) | |
Open a popup using reference to the original window on DOM creation (immediate access with contentDocument) | |
window.open is used to load an embedded iframe. This method should not cause popup blocker to fire | |
... target ... | |
Method #1 | Open a new popup window by adding target="_blank" attribute to a link |
Method #2 | Open a new popup tab when document's "base" element set to target="_blank" |
Method #3 | Open a new popup window by adding target="_blank" attribute to a link followed by e.stopPropagation |
Method #4 | Open a new popup window by adding target="_blank" attribute to a link followed by e.stopImmediatePropagation |
Method #5 | Open a popup using relative link |
Open a popup by creating a dynamic iframe and a dynamic anchor element on its context | |
Method #7 | Open a popup by resetting the DOM events (document.documentElement.remove) with static a[_blank] |
... iframe ... | |
Redirect tab using an IFRAME with "base" header set to target="_parent" | |
Redirect tab using a sandboxed IFRAME with "base" header set to target="_parent" | |
Create a dynamic IFRAME element, then click on the generated link | |
Open a popup by creating a dynamic iframe and executing window.open(...) on its context | |
Open a popup by creating a dynamic iframe and executing window.open(...) on its context with a delay | |
Open a popup with window.open method by preventing content script injection with src="javascript:true" on a dynamic iframe | |
Open a popup with window.open method by preventing content script injection with src="data:..." on a dynamic iframe | |
Open a popup with window.open method by preventing content script injection with src="javascript:..." on a static iframe | |
Open a popup with window.open method injected by "srcdoc". This frame is protected by Content-Security-Policy of script-src 'self' data: . It also prevents content script injection with src="javascript:..." on a static iframe | |
... event ... | |
Open a new about:blank popup window using initMouseEvent('click', ...) method | |
Create new element and dispatch a protected click event (cancelable = false ) | |
Generate a click event using new MouseEvent with button=0 and dispatch it on an anchor element | |
Generate a click event using new MouseEvent with button=1 and dispatch it on an anchor element | |
Generate a click event using document.createEvent('MouseEvents') with button=0 and dispatch it on an anchor element | |
Fire click method of an anchor element | |
... form ... | |
Use form element's action attribute to issue a popup | |
Open a link through dynamic form creation and submission | |
... redirect ... | |
If opening a popup is unsuccessful, redirect current page to destination (redirect with delay). | |
If opening a popup is unsuccessful, redirect current page to destination (instant redirect). | |
If opening a popup is unsuccessful, redirect current page to destination (instant redirect; same origin). | |
... cross-origin ... | |
Open a link on a static protected cross-origin iframe (click on a target='_blank' link) | |
Open a link on a static protected cross-origin iframe (use window.open) | |
Open a link using the window's pointer of a static protected cross-origin iframe | |
... misc ... | |
Method #1 | Open a popup through direct JS execution with href='javascript:window.open |
Method #2 | Click the button to open a popup using same origin tag |
Method #3 | Click the button to download a sample text file (1/2). Your popup blocker should not block this request. |
Click the button to download a sample text file (2/2). Your popup blocker should not block this request. |
Popup blocker is a software that helps you block unwanted pop-ups or pop-unders (a small stand-alone window that suddenly opens with or without a user-action). In general, popups are annoying, therefore there are software or plugins that try to block these king of popups. This page can show you how effective is a popup blocker by testing the software against more than 20 different methods for opening a popup. It is important to note that these are not the only methods to open a popup. Therefore, even if a popup blocker can effectively block these popups, still, there might be situations where a popup is opened in your browser and your popup blocker fails to block it.
These methods are the most common techniques that websites usually use to open popups. As mentioned above each method has an explanation right next to the button which you can read to get more info about the underlying logic behind the generated popup.
There are plenty of software, plugins or add-ons that claim to block popups. However, not all of them are effective. You can search in popular app stores (i.e. Chrome web store, Mozilla or Opera add-on stores) and find a popup blocker. Then, use this website to test whether the popup blocker is effective enough or not. As mentioned above, these tests do not cover all the methods that websites use to open popups. However, these are the most common techniques to open popups as found on various websites.