# 外部链接未在在新标签页中打开

**URL:** <https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493>\
**Category:** Support\
**Created:** [2017年四月5日 16:50 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493 "2017-04-05T16:50:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![11178](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/11178/32/121211_2.png) [@11178](https://meta.discourse.org/u/11178)\
**Post date:** [2017年四月5日 16:50 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/1 "2017-04-05T16:50:26Z")

</div>

![8Ra4ZBZ](https://global.discourse-cdn.com/meta/original/4X/0/7/c/07cc47685d72fc7fd9c475305457c34b29fbcfd7.png)  
即使进行了这些设置，我的链接仍然在同一窗口中打开。该怎么办？

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2017年四月5日 16:55 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/2 "2017-04-05T16:55:34Z")

</div>

That just updates the setting for any new user registrations, you must update it in your User Preferences too.

---

<div class="post-metadata">

**Author:** ![11178](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/11178/32/121211_2.png) [@11178](https://meta.discourse.org/u/11178)\
**Post date:** [2017年四月5日 16:57 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/3 "2017-04-05T16:57:05Z")

</div>

Thanks, where can I find this option?

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2017年四月5日 16:59 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/4 "2017-04-05T16:59:38Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/b/9/b9bf7ee7af4041419fc5a4533fc02d281ebfd54a.png)

---

<div class="post-metadata">

**Author:** ![11178](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/11178/32/121211_2.png) [@11178](https://meta.discourse.org/u/11178)\
**Post date:** [2017年四月5日 17:08 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/5 "2017-04-05T17:08:31Z")

</div>

Hi, I’m not able to find any such options in settings.

---

<div class="post-metadata">

**Author:** ![11178](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/11178/32/121211_2.png) [@11178](https://meta.discourse.org/u/11178)\
**Post date:** [2017年四月5日 17:14 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/6 "2017-04-05T17:14:40Z")

</div>

Basically, I have setup discourse and want all users who click any link redirect to new tab. But I’m not able to do this.

---

<div class="post-metadata">

**Author:** ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)\
**Post date:** [2017年四月5日 17:34 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/7 "2017-04-05T17:34:49Z")

</div>

The screenshot @cpradio is showing are from your user preferences (`/my/preferences`). Whether links should open in another tab or not is a personal preference, although you can set the default for new users.

---

<div class="post-metadata">

**Author:** ![11178](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/11178/32/121211_2.png) [@11178](https://meta.discourse.org/u/11178)\
**Post date:** [2017年四月5日 17:36 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/8 "2017-04-05T17:36:07Z")

</div>

> [@neil](#):
>
> although you can set the default for new users

Already did, but it’s not working ☹

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2017年四月5日 18:01 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/9 "2017-04-05T18:01:02Z")

</div>

What do you see on your user preferences page?

---

<div class="post-metadata">

**Author:** ![11178](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/11178/32/121211_2.png) [@11178](https://meta.discourse.org/u/11178)\
**Post date:** [2017年四月5日 18:37 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/10 "2017-04-05T18:37:31Z")

</div>

正如您之前所说，对于在用户偏好设置中勾选了“在新标签页中打开链接”的个别用户，该功能可以正常工作。

但我希望这些设置是全局生效的。无论任何用户点击任何外部链接，都应在新标签页中打开。

我使用了以下设置，但并未生效。

 ![8Ra4ZBZ](https://global.discourse-cdn.com/meta/original/4X/0/7/c/07cc47685d72fc7fd9c475305457c34b29fbcfd7.png)

---

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [2017年四月5日 18:51 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/11 "2017-04-05T18:51:29Z")

</div>

Changing the “default other external links in new tab” site setting will only take effect for **new** users. To manually change all existing user’s preferences, you can follow the instructions here:

> [@Edit a user preference for everyone or a subset of users](https://meta.discourse.org/t/edit-a-user-setting-for-all-discourse-users/25162):
>
> bookmark This guide explains how to edit a user preference for everyone or a subset of users in Discourse. person_raising_hand Required user level: System Administrator warning Console access is required. If you need to update the user preference for all of your users or a large subset of users, you can do so via the rails console. Summary In this guide, you’ll learn: How to access the Rails console for making bulk changes Examples of modifying user preferences How to identify se…

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [2018年二月21日 21:56 UTC](https://meta.discourse.org/t/external-links-are-not-opening-in-new-tab/60493/12 "2018-02-21T21:56:24Z")

</div>


