Safari Pop Up Blocker ✦

Developers have learned to use showModalDialog (deprecated) or replace pop-ups with <div> -based modals. But for true new windows, the click must be immediate. Mobile Safari takes this to another level. On iPhone, every new window is a tab , not a separate window. The blocker is identical, but with one twist: Meta refresh redirects are also blocked if they occur too quickly. This prevents those malicious "Your iPhone has a virus" fake warnings that try to open 20 tabs per second.

That’s now the job of Safari’s and Hide Distracting Items feature—a manual scalpel instead of an automatic shield. safari pop up blocker

// This works (directly inside a click handler) button.onclick = () => { window.open('/payment', 'PaymentWindow', 'width=500,height=600'); }; // This fails (even 100ms delay) button.onclick = () => { setTimeout(() => { window.open('/popup-ad'); // BLOCKED }, 100); }; On iPhone, every new window is a tab , not a separate window

In the early days of the internet, pop-ups were the digital equivalent of a used car salesman jumping through your window. They multiplied, they hid, and they played loud audio from an unknown tab. Today, thanks largely to Safari’s aggressive and intelligent pop-up blocking technology, that chaos has been tamed. But how does it actually work, and where does it draw the line between "helpful window" and "hostile takeover"? The Definition Shift: What Is a "Pop-up" in 2024? To understand Safari’s blocker, you have to understand its quarry. A classic pop-up is a new browser window spawned by JavaScript. But modern "pop-unders," modal overlays, and subscription dialogs blur the line. Safari doesn't just block window.open() —it analyzes the user gesture . That’s now the job of Safari’s and Hide