In your website you might want to open all external links in a new window so your visitors won’t leave your site. You can insert the target=”_blank” attribute to each link individually but it might forget some of them or it can be more difficult if you are using scripts.
Insert this script snippet into your footer and all links will automatically open in a new window or tab, depending on the visitor’s browser setting:
Just replace “mywebsite.com” with your domain name
Last Update: May 23, 2016