1. #1
    The Lightbringer Twoddle's Avatar
    10+ Year Old Account
    Join Date
    Feb 2011
    Location
    UK
    Posts
    3,775

    How to know in advance if clicking on a link will open in a new tab

    When you open a link by clicking it with the middle mouse button it forces the link to open in a new tab. However some websites make this happen by default and some don't.

    My question is: Is it possible to know in advance whether clicking a link with the left mouse button will open the link in a new tab or in the same window?

  2. #2
    Moderator chazus's Avatar
    10+ Year Old Account
    Join Date
    Nov 2011
    Location
    Las Vegas
    Posts
    17,222
    I suppose if you REALLY wanted to know, you could look at the code of the link and see if it has the "_blank" addition to the html link, indicating a new window. Which seems a lot more work than just clicking it.
    Gaming: Dual Intel Pentium III Coppermine @ 1400mhz + Blue Orb | Asus CUV266-D | GeForce 2 Ti + ZF700-Cu | 1024mb Crucial PC-133 | Whistler Build 2267
    Media: Dual Intel Drake Xeon @ 600mhz | Intel Marlinspike MS440GX | Matrox G440 | 1024mb Crucial PC-133 @ 166mhz | Windows 2000 Pro

    IT'S ALWAYS BEEN WANKERSHIM | Did you mean: Fhqwhgads
    "Three days on a tree. Hardly enough time for a prelude. When it came to visiting agony, the Romans were hobbyists." -Mab

  3. #3
    Deleted
    new tab, new window, in-window popup or same window can be forced by the page. HOWEVER, any decent web developer will leave this decision to the user and not force anything. And most users don't know how to edit a link to force a certain style. so in general, 90% of the links will use your browser default. and a number of the remaining 10% is done through scripts which you have no control over.

  4. #4
    Quote Originally Posted by Temperance Brennan View Post
    new tab, new window, in-window popup or same window can be forced by the page. HOWEVER, any decent web developer will leave this decision to the user and not force anything. And most users don't know how to edit a link to force a certain style. so in general, 90% of the links will use your browser default. and a number of the remaining 10% is done through scripts which you have no control over.
    "decent" web developers will not leave that decision to you. If you click on the link on a navigation pane and your browsers "open in new tab" would open the frame in a new tab it would look pretty goofy. Same with links on forums if every link here would open in a new page report post or reply with quote would get rather messy. Or that a web developer will want to keep his own site open when you click a link to an external site (and if it is just for ad revenue because the ad is displayed longer).

    This should be an interesting read what different ways html5 offers to modify how a link is opened: http://www.w3.org/TR/html5/browsers....ame-or-keyword

  5. #5
    Quote Originally Posted by Twoddle View Post
    My question is: Is it possible to know in advance whether clicking a link with the left mouse button will open the link in a new tab or in the same window?
    Not really, unless you're using some web browser meant for HTMl/CSS development that shows the contents of all tags you're hovering over.
    Never going to log into this garbage forum again as long as calling obvious troll obvious troll is the easiest way to get banned.
    Trolling should be.

  6. #6
    Deleted
    Why does it matter what mouse button you click on the link with?

  7. #7
    Links to external sites are generally (not always) going to open in a new tab / window.

    Links within the same domain are generally (not always) going to stay in the same tab.

    In chrome you can right-click links to open in a new tab, open in a new window, open in incognito window, copy link address...

    Generally middle click opens a new tab open if you want that (as you've already said)
    Computer: Intel I7-3770k @ 4.5GHz | 16GB 1600MHz DDR3 RAM | AMD 7970 GHz @ 1200/1600 | ASUS Z77-V PRO Mobo|

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •