11 ms·
Ask HN: Why doesn't Hacker News open links in a new tab?
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.
- ddevault 6y agotarget="_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.
- james-skemp 6y agoGlad 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 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/a-target-blank/ https://www.powermapper.com/tests/screen-readers/navigation/...
- aitchnyu 6y agoIf 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-124C1DF4357A?ingress=2&visitId=1407ec1b-c2a3-4339-a7c0-75f60bf782b3&ref_=ast_bln&productGridPageIndex=2 https://www.amazon.in/stores/page/7ACF7524-1CDD-45DE-A4F5-12...
- ddevault 6y agoThe 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.
- ziml77 6y agoThere 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)
- zzo38computer 6y agoI 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".
- notRobot 6y agoUse Ctrl+click or Right-click > Open in new tab? It's not complicated.
- mattmanser 6y agoMiddle click on windows also works.
- deleted 6y ago[deleted]
- fsflover 6y agoAs well as on GNU/Linux.
- marssaxman 6y agoMac OS too, if your mouse has a middle button - I use it all the time.
- mtmail 6y agoMy 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.
- disown 6y agoI 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 6y agoI 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?
- mcv 6y agoI 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.
- MrWiffles 6y agoTHIS. 100%.
- deleted 6y ago[deleted]
- paperpunk 6y agoWe 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 ;))
- r2b2 6y agoI typically use `⌘ [` and `⌘ ]` for back and forward navigation. It's rarely in conflict with other hotkey combos, unlike `⌘ →` and `⌘ ←`.
- breeny592 6y agoYeah 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 6y agoSomeone 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.
- marssaxman 6y agoBut 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 6y agotarget="_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 6y 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.
- simonblack 6y agoMiddle-Click...Middle-Click...Middle-Click...Middle-Click...Middle-Click That's the wheel, for you guys coming from a two-button-mouse Operating System.
- r2b2 6y agoWhich OS doesn't support multi-button mice?
- deleted 6y ago[deleted]
- simonblack 6y agoThe 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.
- foopod 6y agoI never use middle click, for me it is ctrl + left click.
- 0-_-0 6y agoIn Firefox you can use middle mouse click or Ctrl+click to open a link in new tab
- DoreenMichele 6y agoWe're all curmudgeons and a lot of us like it like this.
- quintes 6y agoI 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
- md81544 6y agoI'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.
- mig4ng 6y agoI do not know why, but I prefer it to be like this. However, if it helps: - Control + Click OR Mouse middle-click
- bluejellybean 6y agoI 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.