Html errors

HTML 4 deleted it in 1997 because it restricts your visitor’s choices of where they can open pages. Browsers since then still support it because it would break the web pages still written in HTML 3.2 if it were to have been removed completely at that point.

HTML 5 has defined that browsers should continue to support all the HTML 2 and HTML 3.2 tags that people were supposed to stop using when HTML 4 was released in 1997 because even now most web pages are written using HTML 3.2. Just because HTML 5 says that browsers should still accept long dead tags doesn’t mean that you should be using them in new web pages (for example HTML 5 now recognises the embed tag which was never a part of the standard before and which was only ever needed by the now long dead Netscape 4 browser - but people still use the tag even though the only browser that needed it is long gone and so HTML 5 says that current browsers should not break for pages written for that long dead browser instead of using the modern equivalent).

It is not just my opinion that removing one of your visitor’s choices is not user friendly - removing choices that your visitor may want to make is ALWAYS less friendly than allowing them the extra choices.

Anyway it makes no difference to me whether people use the long dead target attribute or not because I told my browser long ago to completely ignore it and to allow me all of the choices that I would have it it were not there. Even if you use it in your page my browser will ignore it and treat your page the same as if you didn’t use it. It is only those people who don’t know how to configure their browser that way that you will be annoying by limiting their choices.

The difference between HTML 4 and HTML 5 is that HTML 4 identified tags and attributes that people should remove from their pages with the view that they not be supported at all in future browsers whereas HTML 5 has recognised that most people are still writing web pages for long dead browsers using HTML 3.2 and proprietary tags and so modern browsers still need to support all that stupidity or the 95% of th web that has yet to be updated to use HTML 4 will break.

It is the agreed wisdom if most if not all usability and accessibility experts that forcing a new window for a link is pretty much always a bad idea. It takes control away from the user for no good reason, which can be confusing, irritating and can even stop a user from achieving what they want to do if it messes up their process too much, which can very easily happen.

If you give a regular link, anyone can choose to open it in the current context, in a new window or a new tab if they want to. If you force target=“_blank” on them, the vast majority of people no longer have a choice. Why do you need to force that on them. Can you give one good reason for forcing everyone to open a link in a new window (which may or may not give a new tab, depending on their preferences)? Because I don’t think I have yet seen one.

I think target_blank is great in some situations- maybe because i have not been using “ctrl + click”. I just cant see the problem. There is also a reason why so many still uses it, right ? Lets say i have a site where i present my work. I have alot of images with web screenshot that links to these sites. The user do not know they are leaving the site when they hit that image (“ctrl + click” on the image). Using target_blank is much better here in my opinion, the user can click around on this site as much as they want - an just close the window, to get back an see the other web screenshot.
How could the user know that they are leaving the site, and therefore should ctrl+click ?

Do you have a link with some info to what you are saying ?

I disagree.

User testing at one of my old jobs showed that not using the target attribute on links to PDFs was BAD usability.

Every single user we tested on was a Windows user, and their regular browser was IE. They expected a link to a downloadable file to be separate from the web pages, every single time. When the users went to close the PDF, they closed the browser, which was never ever what they intended: they intended to close a separate window holding a PDF. When the 10th person accidentally closed their browser and looked all surprised, we had to fix the problem.

I had not anticipated this, partially because as Linux users, everyone in the dev room didn’t have browsers opening PDFs. They were opened automatically by PDF-reading programs, leaving the browser untouched. Since 90+ % of our users for our sites used Windows, target was a better option.

We briefly considered using a steaming pile of JS to do this, but thought it was bloat and little more than a cheat around the validator, who is only there to advise us on mistakes anyways. Linux users could override the link if they wanted, and some browsers would only offer a download and in those cases, opened an empty new tab, which was much less annoying than closing the whole browser would be.

There are 2 main reasons so many sites use it:

  1. they were told by slimy SEO guys that it was somehow “better for the googles”; either all users are so incredibly stupid that they will never ever find that site they loved to death because they clicked forward a few times, or something similar. Extensive user testing by the likes of Nielsen Group show the Back button is one of the most-used parts of the interface. People know how to scroll down, and they know how to go back a page, and they’ve known how to do both for many years now. This is a Good Thing.

  2. Long ago browsers did not have tabs. Like, IE6 doesn’t have tabs. The only options users had back in the day was indeed a new window if they wanted to keep the original window open somewhere. Web developers got in the habit of using target for this reason. Consequently, lots of users were trained in those early days of the web to expect new windows. If you look, many web pages, even if they are newly-built, still have old code, because devs copy stuff. I still occasionally run across fairly new sites who, in Javascript, check if the browser is IE5 or Netscape Navigator 7. I only saw this nasty old code begin to drop when devs realised jQuery could do all their coding for them, so they’d stopped copying old code.

Due to #2, where many users were trained to expect a new window, usability studies have varied somewhat: a new window is usually most confusing when it is large enough to entirely cover the old window. Users then believed they had simply clicked a normal link, and could not hit the back button to go back. This is called “breaking the Back button” and it’s one of those no-nos.

When it’s obvious that there’s another window, or when your target users are fully trained to always expect a new window in a particular circumstance (like our situation above with PDFs), then forcing a new window is less bad. Also in most modern browsers (but I don’t think IE still), many now come with a default checked in the browser configs to open “new windows” in a new tab instead.

How do most people know they are leaving a site?

Years ago, when people were actually still discussing target attributes and new windows (it’s one of those old topics where, if you want to find articles about it at places like A List Apart, you have to find their archives from like 2006 or something), there were suggestions for better usability on how to let users know where a link would take them. Wikipedia is probably a good example of the icon idea. In-site Wikipedia links look like links. Outbound Wikipedia links have a little icon next to them, warning you that they take you to another domain. I click these links with no problem: if I want to go back to the Wikipedia article, I hit the Back button.

Another brilliant idea is, state at the top of the image gallery that the images link to other sites. This idea is so brilliant that most people haven’t caught on, because I rarely see it… though that may have to do with the fact that, on the Internet, everyone is a man, and doesn’t read directions. If you are going to put target attrs on that page, then you would possibly be saving some user frustration by warning them at the top: “Clicking on the images below will open a new window or tab.” It still removed choice from them, but at least it doesn’t sneak up on them and bite. I’m kind of a big fan of a simple statement here and there explaining what will happen next, or what people should expect. Not novels-worth, but just a sentence.

Back in the day, long long ago, you could type “target blank evil” into your search engine of choice and find several pages worth of diatribe against new windows. But since most of the world has already moved on the tabs, there’s a whole generation who only know new windows as Javascript popups. The anti-target posts have dwindled as fewer people use them in the first place.

[FONT=VERDANA]If you don’t use a target attribute, I can choose where I open the link, depending on what I want to do. If you use target="_blank" then what I (ie, your potential customer) want doesn’t get a look in, and I have to accept what you’ve decided I should have*, whether or not that fits with what I want to do. Is that the way you treat customers elsewhere?

The only reason we’re having this discussion at all is because too many developers in the path have misused target="_blank", and people have become so accustomed to encountering it that they have learned to accept it. But just because bad practice is common doesn’t make it right. If webbists stopped using target="_blank", people would very quickly get the hang of choosing whether they wanted to open a link in a new tab/window or not, and if most sites did that then soon it wouldn’t occur to you to expect a link to open in a new window automatically. And if you get it wrong or forget (or if you assume someone will be using target="_blank" when they’re not) it’s very easy to go back and open the link differently if that’s what you want to do.

If I am on your site and I click a link that takes me away, I can hit the back button to go back to your site if I want to. Don’t think people aren’t perfectly capable of that, because they are. Forcing them to keep your site open in the background and giving them no choice in the matter, because you want them to come back, is supremely arrogant and downright unhelpful.

* OK, technically that’s not true, because I’m in the Enlightened One Percent™ that uses Opera, and so can override target="_blank". But obviously most people aren’t in that fortunate position.[/font]

[font=verdana]

I’m amazed. I am a lifelong 'Doze user and at work I have no choice but to use IE, although at home I use everything but. I can’t remember how long ago it was that I encountered a situation where IE opened a PDF natively rather than spawning Adobe Reader as a stand-alone application. Lots of years, at the very least. But either way, there are lots of sites out there that don’t put target="_blank" on PDF links … were these people really such slow learners that they got caught out each and every time they came across one? But then again, most people have target="_blank" configured to open a new tab rather than a new window, so surely these people would still end up closing down their entire browser session if IE was running the PDF through a plug-in?

Perhaps the solution here is to change your server settings so that PDFs are downloaded as Open/Save files rather than viewable, and that way people will always get the stand-alone PDF Reader, so won’t have any room for confusion.

Back in the day, long long ago, you could type “target blank evil” into your search engine of choice and find several pages worth of diatribe against new windows. But since most of the world has already moved on the tabs, there’s a whole generation who only know new windows as Javascript popups. The anti-target posts have dwindled as fewer people use them in the first place.

It doesn’t matter whether the new window/tab is spawned by target="_blank" or Javascript, it’s equally unacceptable either way. Perhaps JS is worse, because the new context is often even more badly-behaved than the old-fashioned way – and the main reason for that is that the perpetrator thinks he knows what size window you’re going to get because he’s specified it in the JS … but then when the browser opens a new tab instead, it’s just the standard full-screen size, so often looks horribly wrong. Not to mention the times when it opens in the background, so the poor user is left stumbling around wondering why the link doesn’t appear to have done anything.[/font]

We used the same machines that were available to our testers (mostly office gophers), but there were no other tabs open, and that may have been part of it. If there was more than one tab open, the browsers would usually ask first. Instead, when testing we’d have a browser open with no other tabs and Google or our company home page as the main page, before taking them to the test site. Fresh start and all that.

No most people only closed their browser once, but I was testing by having them go through a list of tasks, and a few of those tasks you could look for a PDF with more information. Usually they only hit that bug once, but we tested several gophers and a few of our office ladies.

The office machines we used had usually IE7 or 8 (only the secretary downstairs still had IE6), and I’m not certain but I didn’t think that was an option? On my browsers that’s already the default; I don’t think I’ve ever had to explicitly check it.

The gophers used the computers at work but didn’t generally sit at someone’s workstation long enough to set up their own thing. The office ladies did but I don’t know how much they customised them. The desktop insurance software they used opened all stuff up in new windows (not via a browser) so they may have also just done everything with new windows (?).

That would have been a good idea, but we didn’t think of it at the time.

It is up to the browser owner whether they install a plugin for displaying PDFs in the browser or not. It has nothing whatever to do with what operating system or browser is being used. Quite simply if they have a plugin installed because they want PDFs to display in the browser then PDFs will display in the browser and you shouldn’t mess with it by adding a target and if they don’t have a PDF plugin installed then their browser will download the file and open it locally and the target will make no difference.

The PDF is opening in the same window because the browser owner has specifically configured it that way and your supplying a target is overriding your visitor’s specific choice - since the default is to download and open in a separate program.

Anyway, right clicking on the link to the PDF where a plugin is installed will give the choice of opening in the same window, a new tab, a new window or downloading and opening in a separate PDF reader - supplying a target reduces these options by one.