2 ms·
The old-style popup windows have a specific API window.open() that can be blocked. What the author calls popups are mostly just HTML <div> elements, perhaps usi
by lapcat 10mo ago
The old-style popup windows have a specific API window.open() that can be blocked. What the author calls popups are mostly just HTML <div> elements, perhaps using CSS properties such as position and/or z-index, so there's no generic way to block them. It's extremely difficult to block the "bad" ones while allowing the "good" ones. If this were a problem that could be solved generically, then browser extensions would have solved it long ago. Instead, the browser extensions are forced to keep extremely long lists of mostly site-specific elements to block. I'm not sure how the web browser vendors themselves could it it any differently, without completely redesigning HTML.
- econ 10mo agoOnly allow dom/css changes in response to user action.
- lapcat 10mo agoLike... scrolling down the page? Anyway, forbidding pages from loading secondary content would break millions of sites, including the most visited sites in the world. That would be equivalent to completely redesigning HTML/JS.
- econ 10mo agoHave a nice small notification that a "pop-up" was blocked. Wouldn't you like to see it now wouldn't you?
- lesuorac 10mo ago"Click here to prove you're human" Coincidentally, the most devious way I've seen to make users enable notifications from a site.
- econ 10mo agoYou can do that when the page loads. Scroll or timer events could require a non intrusive permission dialog.
- themafia 10mo ago"Only allow play of audio in response to user action." Okay, cool, so there's a giant 'click' event handler on top of the whole page. When you click it I'm going to play a 250ms long sample of silence embedded as a data:// URL into the audio or video element. Now I control the player and can do whatever I want. You've inconvenienced me for 15 minutes.
- econ 10mo ago15 minutes you will never get back.
- deleted 10mo ago[deleted]
- da_grift_shift 10mo agoRight on the money. This should be the top comment IMO, and the fact that it isn't says a lot about modern HN...