🚀 Is building a website too difficult? Let me guide you step by step—Learn about the 「Naibabiji WordPress Website Building Coaching Service」 →

How to determine whether a webpage should open in a new window when writing articles on a website

Do you know how to choose between opening a link in a new window or the current window on a website? You may have noticed while browsing the internet that some websites open linked content in a new browser window (e.g., Baidu search results), while others open content directly in the current window (e.g., Google search results). In this article, Naiba will introduce when to choose to open links in a new window and when to open them in the current window.

What is a New Window?

新窗口打开For example, Baidu"s search results open in a new browser window when clicked. In HTML, the code is target="_blank".
Link
We can set this when inserting links in WordPress.链接新窗口打开

When to Choose to Open in a New Window?

First, we need to understand the purpose of opening in a new window. For example, why does Baidu open in a new window, while Google opens search results in the current page by default? You may have noticed that if opened in the current window, it's equivalent to leaving Google and entering the search result page. With Baidu opening in a new window, you see the results but still retain a Baidu page. Therefore, when building our own website and inserting links, we typically open links to our own site in the current window, while links to third-party websites open in a new window. However, we must analyze based on actual situations, such asSteps to Build Your Own WebsiteIn the article, most links open in new tabs. Normally, after reading step one, users will read step two. If opened in the current window, users would need to go back or reopen the page, which is inconvenient.

Set All Links to Open in a New Window

If you find it too troublesome to set each link to open in a new window one by one, you can directly add the following code to the webpage header to make all links open in a new window.

Summary:

In summary, the general rules for opening links in a new window versus the current window are:
  1. When accessing external websites, open in a new window;
  2. When accessing pages on your own website, open in the current window;
  3. When accessing related reading pages on your own website, open in a new window.
Opening external webpages in a new window allows users to stay on your website, increasing page views (PV). However, if all links on your own website open in new windows, users may open several tabs within minutes, which can cause annoyance and negatively impact user experience.

🚀 Still feeling confused after reading the tutorial? Let me guide you step-by-step instead.

「Naibabiji WordPress Website Building Coaching」 — From selecting a domain and purchasing hosting to installing themes and publishing posts, I「ll guide you through every step, helping you avoid detours and reach your goals directly.

👉 Learn about Website Building Coaching Service
🔒

Comments are closed

The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.

×
二维码

Scan to Follow