or Connect
AppleInsider › Forums › General › Genius Bar › Apple Software › SAFARI: Blocking specific domains from ever launching pop-ups?
New Posts  All Forums:Forum Nav:

SAFARI: Blocking specific domains from ever launching pop-ups?

post #1 of 4
Thread Starter 

Can someone tell me if there is some way to block a specific domain from ever launching via a pop-up window? Without using Parental Controls. The solution I would most like is an extension, I am unable to do this with AdBlock or Javascript Blacklist. I cannot believe Safari doesn't offer a domain blacklist as a standard feature. I cannot believe Safari's window pop-up blocker isn't better.

Citing unnamed sources with limited but direct knowledge of the rumoured device - Comedy Insider (Feb 2014)
Reply
Citing unnamed sources with limited but direct knowledge of the rumoured device - Comedy Insider (Feb 2014)
Reply
post #2 of 4
If you disable javascript and the popups still work, they must be standard links. If disabling javascript stops the popups, there must be something wrong with the javascript blacklist. You might need to put a wildcard in for the domain e.g *.domain.com.

If you just need to stop certain sites loading, you can use /etc/hosts and redirect them to 127.0.0.1. That will load a blank popup.
post #3 of 4
Thread Starter 
Quote:
Originally Posted by Marvin View Post

If you disable javascript and the popups still work, they must be standard links. If disabling javascript stops the popups, there must be something wrong with the javascript blacklist. You might need to put a wildcard in for the domain e.g *.domain.com.
If you just need to stop certain sites loading, you can use /etc/hosts and redirect them to 127.0.0.1. That will load a blank popup.

How do I do the latter?

Citing unnamed sources with limited but direct knowledge of the rumoured device - Comedy Insider (Feb 2014)
Reply
Citing unnamed sources with limited but direct knowledge of the rumoured device - Comedy Insider (Feb 2014)
Reply
post #4 of 4
Quote:
Originally Posted by Ireland View Post

Quote:
Originally Posted by Marvin View Post

If you disable javascript and the popups still work, they must be standard links. If disabling javascript stops the popups, there must be something wrong with the javascript blacklist. You might need to put a wildcard in for the domain e.g *.domain.com.

If you just need to stop certain sites loading, you can use /etc/hosts and redirect them to 127.0.0.1. That will load a blank popup.
How do I do the latter?

In the terminal, type:

cp /etc/hosts ~/Desktop
edit it with TextEdit by adding lines at the bottom with 127.0.0.1 first, then a tab and the URL:

127.0.0.1 www.blockedsite.com

Save and then copy it back to /etc/hosts, you need to use sudo:

sudo cp ~/Desktop/hosts /etc/hosts

You can also edit the file directly using a terminal editor like nano, which saves copying things around:

sudo nano /etc/hosts
scroll down to the bottom and write the above line 127.0.0.1...
hit ctrl-o and then return to save it
ctrl-x to close the file

This is a system-wide change so no matter what browser you use, the site is blocked.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Apple Software
AppleInsider › Forums › General › Genius Bar › Apple Software › SAFARI: Blocking specific domains from ever launching pop-ups?