Settings

Theme

Ask HN: Why doesn't Hacker News open links in a new tab?

15 points by sbouma 5 years ago · 37 comments · 1 min read

Reader

Just wondering why it doesn't open links in new tabs like most other news aggregators. The effect is I end up having to re-open Hacker News a lot because I close my tab rather than hitting the back button. Minor issue, but it happens often enough to make me wonder why they keep it like this.

mcv 5 years ago

I like that it doesn't automatically open in a new tab. That means I have control over whether I want it to open in a new tab. It puts users in control, and that's good.

marssaxman 5 years ago

But it does open links in a new tab, most of the time - because I choose to use my browser's "open in new tab" feature when I click on its links. I appreciate the fact that Hacker News lets me do what I want, instead of trying to override my preferences with some excessively clever bit of scripting.

  • krapp 5 years ago

    target="_blank" isn't an excessively clever bit of scripting, it's an attribute of the anchor tag that's been around since dinosaurs roamed the earth.

    • muzani 5 years ago

      "Excessively clever" is when you know the solution to a problem and apply it, without checking whether it was a problem in the first place.

mtmail 5 years ago

My take: Other news aggregators want more pageviews, higher time-spend-on-site metrics, more advertising revenue, year-on-year growth. To my knowledge HN doesn't have any of those aspirations.

ddevault 5 years ago

target="_blank" is an anti-user design choice.

If a link does not set target="_blank", you can always choose how it will be opened: in this tab, or in a new one, with a left or middle click.

If it has target="_blank", it'll always open in a new tab, even if you don't want it to, and there's no visual indicator that this parameter has been set.

I never set target="_blank" as a general rule for this reason.

  • ziml77 5 years ago

    There are times where it's a good thing. The big one for me is if it's a link to documentation/help while in the middle of something where you don't want to lose state such as filling out a form. I always middle-click those out of caution, but they almost always do the smart thing. (Though I hate when the anchor's href is "javascript:void(0)" and middle clicking doesn't work. In that case it's usually set that way because it displays a modal or other form of help overlay, but there's no guarantee so I just have to pray)

  • james-skemp 5 years ago

    Glad to see accessibility covered in one of the first comments on this.

    The relevant WCAG 2.0 information: https://www.w3.org/TR/WCAG20-TECHS/G201.html

    PowerMapper has some more information (not affiliated, just a happy customer): https://www.powermapper.com/tests/screen-readers/navigation/...

  • aitchnyu 5 years ago

    If your page takes time to load and is not cached, opening in new tab makes it tolerable. Making virtue of of necessity and all that. Irritating example of slow page and regular links, scroll down, open a product link in same page, go back and wait for the spinner and see you lost scroll position. https://www.amazon.in/stores/page/7ACF7524-1CDD-45DE-A4F5-12...

    • ddevault 5 years ago

      The solution to this is not to use target="_blank" - it's not making the origin page non-cachable, take a long time to load, or require client-side state.

  • zzo38computer 5 years ago

    I agree. However, at least on Firefox I can set the "browser.link.open_newwindow" option to disable this feature (and to otherwise configure it); I set it to 1 to tell it to ignore target="_blank".

simonblack 5 years ago

Middle-Click...Middle-Click...Middle-Click...Middle-Click...Middle-Click

That's the wheel, for you guys coming from a two-button-mouse Operating System.

  • foopod 5 years ago

    I never use middle click, for me it is ctrl + left click.

  • r2b2 5 years ago

    Which OS doesn't support multi-button mice?

    • simonblack 5 years ago

      The Apple MAC mice only had one button.

      Windows mice only had two buttons.

      The UNIX OSs used 3 button mice right from the start.

      When browsers became more widespread, it became more usual to add a scroll-wheel to the two-button mice. But most Windows users didn't twig that the wheel as well as being scrollable, was also clickable. Probably that was because at that time very little software for Windows had the capability of using a 3-button mouse.

      UNIX users had the reverse problem. They were used to their mice not being scrollable, so they were very confused when their middle-clicks were also scrolling the mouse (thus moving the cursor) so they were sometimes clicking on the wrong thing.

paperpunk 5 years ago

We had a spirited debate about this in our application at work recently. Some devs feel (strongly) that having no option to open links on the same page is a user-hostile choice. Other devs feels (also strongly) that users most likely want to open a link in a new tab so that’s what should happen.

We never reached an agreement but someone did make a claim, that I was unable to verify, that modern users don’t use the back button and therefore relying on it to allow users to find their way back is unacceptable. I wonder if anyone else has heard that (I suspect the HN crowd knows about the back button though ;))

  • breeny592 5 years ago

    Yeah I definitely sit strongly in the former camp (that is, navigation should be in the same tab for anything that is your content).

    When linking externally or to something that isn't yours, I feel it makes sense to go to a new tab then.

    > someone did make a claim, that I was unable to verify, that modern users don’t use the back button and therefore relying on it to allow users to find their way back is unacceptable

    I think this person is projecting their own experiences. Would be interesting to see the impact that mobile browser experiences have brought to these interactions, but for instance Android has a literal OS wide back button. I think that claim is a pretty far stretch.

  • leighfuu 5 years ago

    Someone most definitely made that up.

    Sadly I've wasted many hours of life in focus groups watching the mob navigate. Back buttons are *used prodigiously, and woe betide anyone who breaks a gesture swipe back - that one gets scowls.

  • r2b2 5 years ago

    I typically use `⌘ [` and `⌘ ]` for back and forward navigation. It's rarely in conflict with other hotkey combos, unlike `⌘ →` and `⌘ ←`.

notRobot 5 years ago

Use Ctrl+click or Right-click > Open in new tab? It's not complicated.

disown 5 years ago

I like it because it reinforces the need to Ctrl-click links. I never click links, I always ctrl-click it after hovering over a link to check the url first.

Also, CTRL and left arrow will return you back to the HN. It's not that big of a deal? Also, it's a good thing as it teaches you some good habits. Why depend on a site to open links in new tabs? Do it yourself. That way you force consistent behavior across all websites/links.

c22 5 years ago

I like that it doesn't open new tabs. I will usually look at the main page and open a few links or conversations in new tabs, but for most links I just dip in and out of the comments with my forward and back keys since I'm mostly trying to just figure out if the entry is worth my time. If it looks like I'm going to engage with it more I'll give it it's own tab.

Why do you want to remove my choice in the matter?

bluejellybean 5 years ago

I use middle mouse click, thumb mouse click, control click, and right mouse click + left click on "open in new tab".

Each method is dependent upon various things including, how I'm sitting, number of items I plan to open, number of comment sections vs just article link, and most importantly, how sore my hands are. Some methods are faster but strain my wrist more than I care to do, so I do those sparingly.

One of the reasons I love this site is the UI, it's very simple and gets out of the way for you. If you want to change the opening mechanism to only do new tabs, you are completely able to do so with code.

To answer your question, there are a variety of reasons why HN may choose to do it this way, other sites have different reasons so you see different site behavior.

0-_-0 5 years ago

In Firefox you can use middle mouse click or Ctrl+click to open a link in new tab

md81544 5 years ago

I'd like to see this as a setting, so both camps can be appeased. I'm like OP, I keep forgetting to manually open in a new tab, then wonder where HN has gone after I close the tab again.

DoreenMichele 5 years ago

We're all curmudgeons and a lot of us like it like this.

quintes 5 years ago

I like to choose. Since I browse on my phone mostly I use the preview to see if I even want to Open the link, then go to new tab. So then I guess it does

mig4ng 5 years ago

I do not know why, but I prefer it to be like this.

However, if it helps:

- Control + Click OR Mouse middle-click

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection