_self or _blank?

Many thanks Vlinder and Stevie.

Thanks everyone. Interesting that links from this site open in a new window.


For a start, you can’t use a target attribute with a Strict doctype, and if you’re not using a Strict doctype then you’re still living in the last millennium.

Second, _self doesn’t do anything (it’s only purpose would be to override <base target=“somethingelse”>, but please tell me you’ve not got that abomination in your code), and _blank is bad for accessibility and usability, and generally irritating.

Links should open in the current window/context unless there is a very good reason for doing otherwise. “I want my website to still be there in the background so people can come back to it afterwards” is not even a good reason, let alone a very good reason.

Many thanks - will go for _blank

Many thanks Ralph, trying to avoid js, but in preference, you would use _blank? So that if the users wanted to go back to your website, they couldn’t click the go back button, to get back to your site, they would have to close the current opened browser? Have I understood you correctly? Just trying to clarify.

so in essence Deathshadow sums it up perfectly and possibly the best use of the rarely used <bto> tag I have ever seen.

Now you can all disagree till you are blue in the face about semantics and which word to use to describe a tag that no longer exists - you say Dodo, I say Didus ineptus - but the fact is that if it gets out of hand and the personal mud slinging starts then the thread will be closed and a good discussion lost.

Well, just remember, it’s invalid markup if you are using a PROPER doctype. Though… well, PM inbound.

:smiley: Well said! :smiley:

What in the name of heaven do those words even mean?

A “likelyhood” is by definition something unforced. How do you force something that is by nature unforced?

Personally I want my visitors to feel at home at my site and stay because my site provides them stuff they need and makes it easy to get at. Or I did until I retired, anyway.

By the way if you force visitors to your home not to leave, that’s called “kidnapping” I believe. Odd morals you seem to have…

Guys, I’m all for a heated debate, but this one here is getting a tad too hot for my taste.
Please dial a down a few notches. Thanks :slight_smile:

Then don’t do it, instead use techniques that force the likelyhood of them staying. That’s what conversion paths and exits are, and sales funnels. Sites that are actually selling something force behaviour even more than non-commercial sites.

And Alex thinks that forcing another browser window to open is being ‘abusive’ to visitors. Sigh, I better go and politely suggest to my users that they may possibly want to right click ‘open in new tab’ on my externals because I don’t want them to leave my lovely kind politically correct non-abusive site, pretty please.

I alwas use _blank if it is another site. like that your site still stays open and the surfer will still see the site.

You could give the window a name and use that instead of _blank. At least then you would only have one extra window regardless of how many times your visitor selects to open one of those links.

_blank is more appropriate there, but be aware that both are deprecated, meaning that they are no longer welcome on the web.

It might be better to use a bit of JavaScript/jQuery for this:

<script src="/scripts/jquery-1.2.1.min.js" type="text/javascript"></script>

<script type="text/javascript">

Yes, that’s what I would use… in theory. To be honest, though, I’m not too clear on the use of _self. Here is more info on it, written by people who now what they are talking about: