Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

New windows for off-site links?

Is it better commercially



8:22 pm on Jan 9, 2006 (gmt 0)

10+ Year Member

Is it better, commercially, to set up off-site links to open in new windows? My instinct is that it is. I tend to expect it, and in a strange site, I get irritated when I haven't noticed the back button is dead, and kill the page, only to find a new window has not been opened, and the browser has been shut down too.

OTOH, target blank is deprecated in strict html and xhtml. So the w3c don't agree with me. I know there is bulky javascript (not used by 20% or so of users) and other clunky methods, but none are as neat as


What do you do, particularly on commercial sites?


9:14 pm on Jan 9, 2006 (gmt 0)

10+ Year Member

Hi kiwibrit,

I've recently re-done our web site in XHTML 1.0 strict and ran into exactly that problem. I have gone the Javascript way to open external links in a new window. If JS is not activated, then the page will open in the same window, but these days one misses out on so much on the web if JS is disabled that I think users may get more savvy in toggling the option.

Also, if your estimates are correct that 20% have JS disabled, that still leaves me with good odds. If the others have to hit the back button to come back to my site, so be it.




9:41 pm on Jan 9, 2006 (gmt 0)

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

I HATE the fact that target="_blank" is deprecated. I use it all the time so I don't have to use javascript and I don't have to lose people from my site.

who decides these things anyway? And why aren't they wearing tin foil hats?


10:15 pm on Jan 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

I also agree that, except in rare instances, all offsite links should open a new window by default. I know many of the "it's my browser" folks hate the whole concept of target="_blank", but then, those of us who are in that crowd are the ones who know how to prevent new windows in the first place. So I don't see that our opinion matters.

You pegged the issue when you said many users expect and like new windows sometimes; many of my visitors also appreciate that offsite links open a new window. They're normally interested enough in what they're viewing on my site that they'd like to "hold their place," but they're interested enough in the offsite link to give it a look, too. And most don't even know they can open new windows themselves, which puts the decision right in our laps as far as I can tell.

Regarding the web standards, the <br> tag and target="_blank" are two of the biggest mistakes they've made about what to deprecate, in my opinion. Both are among the few small bits of invalid code I'm actually willing to use on my site, when there's a good reason.

<rabbit trail>Which brings up a related issue on validation...I've always held that outright validation isn't nearly as important as knowing what valid code is and making an informed decision about what, if any, invalid code you'll use. </rabbit trail>

Incidentally, unless you're catering to an audience that is really picky about seeing a "Validated" graphic on your site, I'd just forget about complete validation and use the target="_blank" instead of a JS solution. Javascript just isn't as stable or universal as the target option.


12:23 am on Jan 10, 2006 (gmt 0)

10+ Year Member

Actually, I pro validation as a first stepping-stone to good accessibility - which I also support. But I fail to see why
was deprecated. For the moment, I am leaving those pages which require outside links in transitional DOCTYPE so that I can retain that coding.


1:15 am on Jan 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Oops, it looks like I made a mis-statement above about the <br> (or <br />) tag. (Thanks for asking about that, tedster.) It's not deprecated after all, although some have spoken of axing it [webmasterworld.com]. Sorry for any confusion.

Regarding validation and accessibility, I also believe it's valid code is a good first step toward accessibility. But I think opening new windows is kind of a catch-22 situation. We do it to improve accessibility in some situations, yet target="_blank" is invalid code, and therefore it's not as accessible as we could wish. We're therefore left with javascript, but by its very nature, it's not generally considered accessible either. So we know the result we want, and we have two un-ideal choices to reach the objective.

Take your pick between the two - I won't pretend to know the right answer. I prefer target="_blank" to a javascript solution. I certainly wouldn't say that my answer is the best for everyone, however.


10:45 am on Jan 10, 2006 (gmt 0)

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member

The strict standard is just plain wrong in this case. Standards should be used to simplify browser implementation and ensure uniform behaviour. Standards should not be used to force webmasters to resort to javascript to achieve simple behaviour.

I find it absolutely mind-boggling that even xhtml does not support client-side includes. This could be achieved as simply as <div src="url">upgrade your browser</div>. The idiots in charge of standards are just that - idiots.



Featured Threads

Hot Threads This Week

Hot Threads This Month