开发者

What is the best practice on whether/when to open a link in a new window/tab?

Is there a best practice on whether or when to open a new link in a new window/tab (ver开发者_开发知识库sus forwarding the current window/tab to the new link)?


It is good practice to open the link in a new window/tab if:

  1. The target is on another website and the user is likely to continue browsing your site after following it
  2. The primary purpose of the link is to print the content, so it contains no navigation
  3. The link is a detour from a standard workflow (ie a help page in the middle of a mutli-step form


A good guiding principle in web design is the back button. It's the one piece of UI that virtually all web users know how to use.

Thus the only appropriate place to use links that open new windows is in states which can't be easily reached by the back button.

A prime example of this is links in the midst of forms:

What is the best practice on whether/when to open a link in a new window/tab?

If the users click on the form then the back button will not get them to the state they were at - with the form being partially filled.

This is not to say that target="_blank links are the only or even a particularly good solution to this problem, but they are the one place where users are expecting them and they can be actually beneficial.


Internet users like me are used to "open page in new tab", so, just leave all your link as normal :) But of course not everybody do that, but please reduce to as little as possible.


Usually when the new link points to an external resource users might want to keep the original page open. Otherwise the convention is not to confuse users and keeps links behave link links and navigate to a new page. Advanced users could always hold the shift/ctrl key to open a new tab/window


Between whether to open a page in a new window versus in a new tab:

If you need to open the link in a new window or tab, use target="_blank". You can either use a transitional doctype with your pages or use JavaScript to inject that attribute. The browser will decide, based on user settings, whether to open it in a new window or tab.


Non developers will prefer to see a new window as this is more clarity to what they are reading. Developers and non-developers are a little different technically.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜