About That "Open Link In A New Window" Logic

Feb 22, 2014Ryan Burnette

Link targets are as easy to overlook as they are critically important. Content publishers need to think about target behavior each time they create a link. This makes it easy to err or be inconsistent.

For years I've been explaining the logic behind link targets to my clients. Links to other content on the site should stay in the current target. Links to other sites should open in a new window to maintain the user's visit on the current site. There are surely differing opinions on that, but this is the prevailing policy for almost everything I've ever worked on.

Such simple logic should have its actions determined programmatically rather than leaving it up to human effort.

I created Decently Smart Target for this purpose. It's a tiny jQuery plugin that sets the target attribute for links automatically. If a link is heading off the current host it gets its target set to blank.

It won't work for everyone, but it has already saved a ton of headache that used to require repeated user training and reminders.

Blog Index