January 26, 2015

Small Gripe: Target=“_blank”

edit

I’m often asked to make small, almost trivial changes to our clients’ websites. One of these changes that grinds my gears is the frequent request to “Make this hyperlink open in a new tab/window.”

This bothers me because it changes the default behavior of links and takes away the user’s control over his or her browser. Default behavior of a link is to open in the current window. Now, every browser/system I know of provides the user with an action that can open a link in a new tab (for example, cmd + click on Mac will do this). Adding a target="_blank" to a link robs the user of this ability.

Clients’ reason that opening a link in a new tab will prevent a customer from leaving a site prematurely and not converting a sale. Shouldn’t we have faith that our customers will stick around and buy products if they want to? One might even reason that removing the default behavior might be discomforting enough to turn away users.

My thoughts, don’t selfishly change default behavior if you don’t have to.

Here’s a much better written article on the subject: http://css-tricks.com/use-target_blank/


Liked the post?
Give the author a dopamine boost with a few "beard strokes". Click the beard up to 50 times to show your appreciation.
Need help with your software problems?

My team and I are ready to help you. Hire Agathist to build your next great project or to improve one of your existing ones.

Get in touch
Kyle Shevlin's face, which is mostly a beard with eyes

Kyle Shevlin is the founder & lead software engineer of Agathist, a software development firm with a mission to build good software with good people.

Agathist
Good software by good people.
Visit https://agath.ist to learn more
Sign up for my newsletter
Let's chat some more about TypeScript, React, and frontend web development. Unsubscribe at any time.
Logo for Data Structures and Algorithms
Data Structures and Algorithms
Check out my courses!
If you enjoy my posts, you might enjoy my courses, too. Click the button to view the course or go to Courses for more information.