Jump to content

Google chrome: how to prevent websites from opening new windows/tabs?

MyName13

Chrome has a pop-up blocker built-in. Other than that, whether a link will open in the same tab or new is dictated by the website's code.

 
~ Specs bellow ~
 
 
Windows 10 Pro 64-bit [UEFI]
CPU: Intel i7-5820k Haswell-E @ 4.5-4.7Ghz (1.366-1.431V) | CPU COOLER: Corsair H110 280mm AIO w/ 2x Noctua NF-A14 IPPC-2000 IP67 | RAM: G.Skill Ripjaws 4 32Gb (8x4Gb) DDR4 @ 2666mhz CL15 | MOBO: MSI X99S Gaming 7 ATX | GPU: MSI GTX 1080 Gaming (flashed "X") @ 2138-2151Mhz (locked 1.093V) | PSU: Corsair HX850i 850W 80+ Platinum | SSD's: Samsung Pro 950 256Gb & Samsung Evo 850 500Gb | HDD: WD Black Series 6Tb + 3Tb | AUDIO: Realtek ALC1150 HD Audio | CASE: NZXT Phantom 530 | MONITOR: LG 34UC79G 34" 2560x1080p @144hz & BenQ XL2411Z 24" 1080p @144hz | SPEAKERS: Logitech Z-5450 Digital 5.1 Speaker System | HEADSET: Sennheiser GSP 350 | KEYBOARD: Corsair Strafe MX Cherry Red | MOUSE: Razer Deathadder Chroma | UPS: PowerWalker VI 2000 LCD
 
Mac Pro 2,1 (flashed) OS X 10.11.6 El Capitan 64-bit (NAS, Plex, HTTP Server, Game Servers) [R.I.P]
CPUs: 2x Intel Xeon X5365 @ 3.3Ghz (FSB OC) | RAM: OWC 16Gb (8x2Gb) ECC-FB DDR2 @ 1333mhz | GPU: AMD HD5870 (flashed) | HDDs: WD Black Series 3Tb, 2x WD Black Series 1Tb, WD Blue 2Tb | UPS: Fortron EP1000
 
Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, SaladFingers said:

Chrome has a pop-up blocker built-in. Other than that, whether a link will open in the same tab or new is dictated by the website's code.

But shouldn't there be an option to ask the user whether a new tab/window should be opened by a website?Chrome doesn't block all pop ups

 

1 minute ago, L.Lawliet said:

Use Pop up blocker..

Oh wait? dont use it its useless ;) 

I've tried popper blocker, it seems to work.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, MyName13 said:

Does such option even exist?

In the upper right corner, click on the three vertical dots.  This will take you to a drop down box and in that drop down box, click on "Settings".

 

Under the settings tab, click on the link "Privacy and Security".  That will open the choices under that heading, all you need to do is turn on the options that you want.

 

When you are done with the Privacy and Security choices, just close Chrome and all should be good to go.

 

I turn them all on with the exception of two.  The first is the one about a website prediction service and the second is a website spelling correction service.  Don't use the spell checker because I figure if I can't spell a word correctly, or figure out how to spell a word correctly and I'm 63 years old, then it's too late anyway so why bother.

 

Hope this information helps.

 

Oh yea, I also use Adguard.

 

Link to comment
Share on other sites

Link to post
Share on other sites

35 minutes ago, MyName13 said:

But shouldn't there be an option to ask the user whether a new tab/window should be opened by a website?Chrome doesn't block all pop ups

 

It's a fundamental design thing about how browsers render pages. The developer has the ability to specifically choose what to do with links.

 

Here's an example of a hyperlink with basic HTML:

<a href="https://google.com">Click me</a>

 

Now here's an example of the same hyperlink, with an added variable:

<a href="https://google.com" target="_blank">Click me</a>

The above will try to open it in a new tab, which depending on your pop-up blocker settings might or might not be allowed to open.

 

Apart from HTML similar things can be done with scripting languages like Javascript. The sneaky adware that tries to open new windows and whatnot usually uses JS. Usually those are the ones that are picked by your pop-up blocker.

 

When it comes to scripts, you can block them in several ways. You can either permanently block scripts in your browser (which might break many websites so it's not recommended) or use script blockers based on blacklists, like Ublock Origin. But of course, blocking isn't the same as changing the default behavior. In order to do that you would have to inject the HTML/JS code and change it to function like you want to (like opening the above code in inspector and removing the "_blank" parameter). There could possibly be an extension for that, or a tampermonkey script.

 

Edit: To further answer your question, I'm not sure why such functionality doesn't exist as an option. Many websites do rely on opening popups or not for their functionality, but the user should have a choice nonetheless.  This extension might be partly what you're looking for.

 
~ Specs bellow ~
 
 
Windows 10 Pro 64-bit [UEFI]
CPU: Intel i7-5820k Haswell-E @ 4.5-4.7Ghz (1.366-1.431V) | CPU COOLER: Corsair H110 280mm AIO w/ 2x Noctua NF-A14 IPPC-2000 IP67 | RAM: G.Skill Ripjaws 4 32Gb (8x4Gb) DDR4 @ 2666mhz CL15 | MOBO: MSI X99S Gaming 7 ATX | GPU: MSI GTX 1080 Gaming (flashed "X") @ 2138-2151Mhz (locked 1.093V) | PSU: Corsair HX850i 850W 80+ Platinum | SSD's: Samsung Pro 950 256Gb & Samsung Evo 850 500Gb | HDD: WD Black Series 6Tb + 3Tb | AUDIO: Realtek ALC1150 HD Audio | CASE: NZXT Phantom 530 | MONITOR: LG 34UC79G 34" 2560x1080p @144hz & BenQ XL2411Z 24" 1080p @144hz | SPEAKERS: Logitech Z-5450 Digital 5.1 Speaker System | HEADSET: Sennheiser GSP 350 | KEYBOARD: Corsair Strafe MX Cherry Red | MOUSE: Razer Deathadder Chroma | UPS: PowerWalker VI 2000 LCD
 
Mac Pro 2,1 (flashed) OS X 10.11.6 El Capitan 64-bit (NAS, Plex, HTTP Server, Game Servers) [R.I.P]
CPUs: 2x Intel Xeon X5365 @ 3.3Ghz (FSB OC) | RAM: OWC 16Gb (8x2Gb) ECC-FB DDR2 @ 1333mhz | GPU: AMD HD5870 (flashed) | HDDs: WD Black Series 3Tb, 2x WD Black Series 1Tb, WD Blue 2Tb | UPS: Fortron EP1000
 
Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, SaladFingers said:

 

It's a fundamental design thing about how browsers render pages. The developer has the ability to specifically choose what to do with links.

 

Here's an example of a hyperlink with basic HTML:


<a href="https://google.com">Click me</a>

 

Now here's an example of the same hyperlink, with an added variable:


<a href="https://google.com" target="_blank">Click me</a>

The above will try to open it in a new tab, which depending on your pop-up blocker settings might or might not be allowed to open.

 

But browsers are the ones who execute all the commands given in the HTML/CSS/JS files (and should be able to block this), it's incredible how chrome, edge and probably firefox don't have this option, how is that even possible?

Link to comment
Share on other sites

Link to post
Share on other sites

13 hours ago, MyName13 said:

But browsers are the ones who execute all the commands given in the HTML/CSS/JS files (and should be able to block this), it's incredible how chrome, edge and probably firefox don't have this option, how is that even possible?

Yep, check my edit above. It's weird that browsers aren't taking more control over this functionality. The web isn't as simple as it used to be.

 
~ Specs bellow ~
 
 
Windows 10 Pro 64-bit [UEFI]
CPU: Intel i7-5820k Haswell-E @ 4.5-4.7Ghz (1.366-1.431V) | CPU COOLER: Corsair H110 280mm AIO w/ 2x Noctua NF-A14 IPPC-2000 IP67 | RAM: G.Skill Ripjaws 4 32Gb (8x4Gb) DDR4 @ 2666mhz CL15 | MOBO: MSI X99S Gaming 7 ATX | GPU: MSI GTX 1080 Gaming (flashed "X") @ 2138-2151Mhz (locked 1.093V) | PSU: Corsair HX850i 850W 80+ Platinum | SSD's: Samsung Pro 950 256Gb & Samsung Evo 850 500Gb | HDD: WD Black Series 6Tb + 3Tb | AUDIO: Realtek ALC1150 HD Audio | CASE: NZXT Phantom 530 | MONITOR: LG 34UC79G 34" 2560x1080p @144hz & BenQ XL2411Z 24" 1080p @144hz | SPEAKERS: Logitech Z-5450 Digital 5.1 Speaker System | HEADSET: Sennheiser GSP 350 | KEYBOARD: Corsair Strafe MX Cherry Red | MOUSE: Razer Deathadder Chroma | UPS: PowerWalker VI 2000 LCD
 
Mac Pro 2,1 (flashed) OS X 10.11.6 El Capitan 64-bit (NAS, Plex, HTTP Server, Game Servers) [R.I.P]
CPUs: 2x Intel Xeon X5365 @ 3.3Ghz (FSB OC) | RAM: OWC 16Gb (8x2Gb) ECC-FB DDR2 @ 1333mhz | GPU: AMD HD5870 (flashed) | HDDs: WD Black Series 3Tb, 2x WD Black Series 1Tb, WD Blue 2Tb | UPS: Fortron EP1000
 
Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×