Then there is no need to press the back button multiple times. On the other hand, if the link opens in a new tab, the user can click around the other website and then easily get back by closing the new tab or clicking the tab that your site is on. If a user clicks on an external link that opens in the same tab, then that could make it harder to get back to your site.įor example, if the user clicks around the new site after opening the link, then the user may need to click the back button multiple times before getting back to your site. Having your external links open in a new tab could possibly help improve engagement metrics like bounce rate and time on site. Many website owners prefer to open external links in a new tab in order to keep visitors on their site longer. There are several considerations to keep in mind. Most of the debate revolves around external links and whether they should open in the same or a new tab. Should you open external links in a new tab? If you decide to open an internal link in a new tab, then you should probably tell the reader about it, for example by putting “(opens in new tab)” next to the link. This is the standard behavior and anything else is going to be highly unexpected for users. ![]() With very few exceptions, internal links should open in the same tab or window. Internal links should open in the same window If you are using a smartphone or tablet, you can usually see where a link goes with a long press. If it goes to a different domain, then it is an external link. If it goes to the same domain as you are currently on, then it is an internal link. When you do, you should see the URL of the link at the bottom of the screen. If you are using a computer, then you can see whether a link is an internal or external link by hovering over it. External links: Clicking on an external link brings you to a page on another website.Internal links: When you click on an internal link, it takes you to another page on the same website.Therefore, when discussing whether to open links in a new window or tab, this usually refers to opening a new browser tab, not a new browser window. However, with the invention of tabbed browsing, separate pages now usually show in new tabs instead of separate windows. Windows vs tabsīack in the day, if you wanted to open a new web page separately from the web page you were browsing, it would open in a new application window. In this article, I review the pros and cons of opening links in the same or new tab and what you should choose for your own site.īut first, let’s quickly review the difference between windows and tabs, as well as internal and external links. One of the things I have considered is the behavior of links, specifically whether they should open in a new tab / window or not. In the example below, the link is for terms and conditions and the class is called terms.I have obsessed over every small detail when it comes to a website’s user experience. It is common to open links in a new window by targeting a class. And we do not need to add any additional markup, as jQuery handles it all. ![]() It does not matter where the link is on the website, as long as this jQuery has been loaded on the page. ![]() So in this example, when a user clicks on any link to, it will open in a new window. In this case, when you click on a link, normal browser behaviour would be for the link to open in the same window, which is what we are trying to override. return false will prevent normal browser behaviour from occurring. window.open will open a new window with the link that has just been clicked ( this.href). This is known as an attribute equals selector. In this example, we are targeting a href attribute with a value of.
0 Comments
Leave a Reply. |