Within SharePoint, you can have links to other resources outside of SharePoint. These could go to other internal systems, or external websites. Also, if you’re using Enterprise Search and index websites which are not within SharePoint the search results will include links to outside of SharePoint. The issue with linking to external sites and resources outside of SharePoint is that the link takes over the window so the user leaves SharePoint. Instead, I want the user to go to the link within a new window, thereby keeping the user in SharePoint when they’re done with other resource.
Pretty simple concept, but updating links manually throughout SharePoint might be a pain. Below is a simple little JQuery script that checks all hyperlinks on the page and if it references an external URL, it will set the target to blank! Throw this in your masterpage or in a content editor web part if you only want it on a couple of pages.
NOTE: you’ll need to include a reference to the JQuery files, below I’m using Google’s API, but I recommend uploading the JQuery file into your farm and referencing that instead.