TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

6 点作者 akiranews将近 2 年前
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

9 条评论

gregjor将近 2 年前
&gt; Why doesn&#x27;t HN open news to a new window?<p>Because the links don&#x27;t have &#x27;&lt;a ... target=&quot;_blank&quot;&gt;&#x27; in them.<p>&gt; Was that a design choice?<p>That&#x27;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 &quot;design choice.&quot;<p>&gt; Why would they choose that?<p>Because browsers let you open links in new tabs&#x2F;windows if you want (right click, middle click, ctrl-click), but they don&#x27;t let you prevent the new tab&#x2F;window if the &lt;a&gt; element has the &quot;target&quot; attribute. In lieu of compelling reasons to the contrary, it&#x27;s best to let users control their browser.<p>Maybe the HN programmers also wanted to cut down on the &quot;I have too many tabs open, I need some way to manage them&quot; posts by not contributing to that problem.
评论 #36269597 未加载
bombcar将近 2 年前
Most people know about middle click or right click - new window.
necovek将近 2 年前
No browser has an &quot;open in this window despite what the target attribute says&quot; click, so in that sense, it&#x27;s for the better (user should be in control).<p>The alternative (middle click or whatever multiple-finger tap to open in a new tab) is usually available.
electroagenda将近 2 年前
I think that question is more complicated to reply than it looks like.<p>From the point of view of HN, it should be better to open in new window. That avoids users going out of your page.<p>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.<p>So, to me, HN has decided to please its audience at the cost of loosing pageviews.
akiranews将近 2 年前
Good comments from everyone. For anyone else stumbling to this thread I want to add that at least on iPhone&#x27;s Safari it&#x27;s more cumbersome to open to a new window than it is on a desktop browser with middle click or ctrl click.
jakabia将近 2 年前
To be honest, I&#x27;m on the edge to write a Firefox extension just to solve this problem. I&#x27;m using a Macbook with a touchpad, and sometimes it&#x27;s just inconvenient that I can&#x27;t just click on it.
mejutoco将近 2 年前
You can control click or middle click on a link.<p>Most websites only open external links on a new window&#x2F;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将近 2 年前
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.<p>Better UX IMHO
gnicholas将近 2 年前
There are HN-optimizing browser plugins that include this as a functionality.