Recently, there was an article on SmashingMagazine which covered the topic whether links on websites should open in a new window. Personally, I almost always open links in a new tab unless I’m done with the current site. So if I’m reading an article on a website, I’m letting to open links in the background (tab) but I keep reading the main article — when I’m finished, I’ll check the opened links in order to read them carefully. But this is just a personal behavior — it’s always a matter of taste and it’s individual. The main reason, why I’m having links with the ‘open in new window’-property (target="_blank") is that I’m having internal and external links on this website. Only internal links will be opened in the same window while external links are opened in a new window.
So this script gives the user the options in what window the link will be opened. The script is lightweight and very easy to integrate. Download the script at first. Copy the files in your preferred website-folder and add the following line at the end of your HTML-code (before the </body>-tag):
Then just add the “name”-attribute (or “rel” but “name” works faster) to the links you want to use TargetChooser. This may look like this:
I hope you like this tool. I think it’s a good compromise for the “target problem”.