Kyle Shevlin 3/26/2016

JavaScript: External Links in New Tabs

Read Original

This technical article provides a JavaScript solution for automatically modifying all external links on a webpage to open in new browser tabs. It explains a function that selects anchor tags with href attributes starting with "http", adds the target="_blank" attribute, and includes the important rel="noopener noreferrer" for security and performance.

JavaScript: External Links in New Tabs

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet