Do more on the web, with a fast and secure browser!

Download Opera browser with:

  • built-in ad blocker
  • battery saver
  • free VPN
Download Opera

Why Do Links Open in New Tabs Sometimes, & in Same Tab Sometimes?

  • It seems that clicking links is having erratic results, sometimes a new tab, other times the same, which messes me up when I'm in the middle of writing a comment, etc. How can I get it to always do one or the other?

  • Links that are set to open in a new tab have special code added to them:
    :link[target="_blank"], :visited[target="_blank"], :link[target="_new"], or :visited[target="_new"]

    Links lacking code like that will open in the same tab. You can force a link to open in a new tab by middle-clicking it.

  • He missed javascript links, but otherwise yeah. The page designer decides whether links should open in the same page or a new one. On many sites, it is set so that off-site links open in a new tab, while links on the same site open in the same tab.

  • With the update 51.0 I notice that sometimes, cmd-clicking links will open in the same tab and sometimes in a new tab (google search result for example).
    [ Version: 51.0.2830.34, OSX 10.12.6]

  • Is there not a preference setting to make every new link, web search result, etc. open in a new tab? Safari and Chrome both have this. I just started re-using Opera again and was surprised when tabs I was using were replaced. I don't want to have to use the Control key to force the new tab option every time.

  • @mvbmac Nope, there isn't. And I couldn't find one in Chrome either.

  • You know what, now that you mention it, I can't find that command in Chrome preferences any more, either. It sure used to be in there, and that's how my Chrome app behaves. Strange!

  • The way the links open is strictly up to the link author. AFAIK, no browser can override that behavior.

    At some point, the "rel" tag may also affect links as browsers adopt the recommended behavior. rel=external is supposed to open in a new tab or window.

Log in to reply

Looks like your connection to Opera forums was lost, please wait while we try to reconnect.