How to prevent Adsense links from opening in new tab

Asked

Viewed 396 times

4

Is there any method to prevent my site from opening links in a new tab and making them open in it? And the other way around? Thank you.

Edit: I use Google Adsense. Some ads open in the same tab, others open a new tab. I wanted to block that open in new tab.

1 answer

1

Yes, to always open in the same tab, use the attribute _self, and to always open another tab, the attribute _blank.

For example:

<a href="http://www.seusite.com" target="_blank">Abre em outra página</a>

<a href="http://www.seusite.com" target="_self">Abre na mesma página</a>

Edit: Take a look on this page, especially in the comments, where there is even the link to a possible solution. But already I say that, according to there, modify the behavior of google ad sense can hurt the terms of service, and you can even be kicked out of the system.

  • But where the person clicks on my site is flash, and is already scheduled to open in new tab.

  • Is there no other method but attribute? Something that affects the entire site?

  • Ah, in this case I don’t know, I think you have to set this up in the flash itself, but there might be something in js... I suggest you edit the question to include more details, mainly stating that the site is flash...

  • The site is not in flash. It is because it has ads from Google Adsense. Some open in new tab, others do not.

  • 1

    I edited the answer, but I don’t think I have good news. :)

  • If you don’t know the rules yet, read before making Kaka

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.