Settings

Theme

Ask HN: Why doesn't HN open news to a new window?

6 points by akiranews 3 years ago · 11 comments · 1 min read


Is this a design choice? Why? This one seemed to discuss this already but even they ended up using a plugin: https://news.ycombinator.com/item?id=3399167

gregjor 3 years ago

> Why doesn't HN open news to a new window?

Because the links don't have '<a ... target="_blank">' in them.

> Was that a design choice?

That's the default for links. You have to explicitly add the target attribute to tell the browser to open a new tab or window. Someone decided on this behavior (the default behavior), so I guess you can call it a "design choice."

> Why would they choose that?

Because browsers let you open links in new tabs/windows if you want (right click, middle click, ctrl-click), but they don't let you prevent the new tab/window if the <a> element has the "target" attribute. In lieu of compelling reasons to the contrary, it's best to let users control their browser.

Maybe the HN programmers also wanted to cut down on the "I have too many tabs open, I need some way to manage them" posts by not contributing to that problem.

  • xigoi 3 years ago

    > they don't let you prevent the new tab/window if the <a> element has the "target" attribute.

    Don't browsers have an “open in current tab” option?

bombcar 3 years ago

Most people know about middle click or right click - new window.

necovek 3 years ago

No browser has an "open in this window despite what the target attribute says" click, so in that sense, it's for the better (user should be in control).

The alternative (middle click or whatever multiple-finger tap to open in a new tab) is usually available.

electroagenda 3 years ago

I think that question is more complicated to reply than it looks like.

From the point of view of HN, it should be better to open in new window. That avoids users going out of your page.

However, as a blogger I have discovered the technical audience annoys enormously when links open in a new window. People get angry because you always have the shortcut to choose the new window if you indeed desire that.

So, to me, HN has decided to please its audience at the cost of loosing pageviews.

akiranewsOP 3 years ago

Good comments from everyone. For anyone else stumbling to this thread I want to add that at least on iPhone's Safari it's more cumbersome to open to a new window than it is on a desktop browser with middle click or ctrl click.

jakabia 3 years ago

To be honest, I'm on the edge to write a Firefox extension just to solve this problem. I'm using a Macbook with a touchpad, and sometimes it's just inconvenient that I can't just click on it.

mejutoco 3 years ago

You can control click or middle click on a link.

Most websites only open external links on a new window/tab because they don‘t want you to leave to monetize you further. Maybe hn does not care as much, which is good IMO.

krm01 3 years ago

At least you noe have a option with keyboard shortcuts to open in a new tab if you choose to do so. If you don’t want that, you can open it in the same tab.

Better UX IMHO

gnicholas 3 years ago

There are HN-optimizing browser plugins that include this as a functionality.

Keyboard Shortcuts

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