Welcome Guest!
Please login
If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:
- Receive Fast Advice
- Learn Programming Languages
- Get Professional Website Reviews
- Quick Troubleshooting Assistance
Use Target="_blank" Or Not?
This is a discussion on Use Target="_blank" Or Not?, within the HTML/XHTML section. This forum and the thread "Use Target="_blank" Or Not?" are both part of the Designing Your Website category.
![]() ![]() |
Mar 9 2008, 08:18 PM
Post
#1
|
|
![]() Don deluzione ![]() ![]() ![]() ![]() ![]() Group: Team Leaders Posts: 860 Joined: 13-February 08 From: 10km from nowhere and just south of nothing Member No.: 7 |
I've read somewhere (don't remember where) somebody was saying: "If I want the page opened in a new page, I'll hold the shift-key".
So: When and how to use the target="_blank"-attribute for internal and external links..? I usually let internal link open in the same window, external links with a target="_blank".. -------------------- |
|
|
Mar 9 2008, 08:29 PM
Post
#2
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Group: Members Posts: 119 Joined: 14-February 08 From: Hounslow, London Member No.: 133 |
Do not use target blank. If you really, and I stress, really need a page to open in a new window, use JavaScript.
This presentation gives you a very nice way to open windows with JavaScript. I never use popup windows, though. They're just a hassle when you don't want to have a link open in a new window. This post has been edited by Ryan: Mar 9 2008, 08:29 PM -------------------- |
|
|
Mar 9 2008, 09:03 PM
Post
#3
|
|
![]() Squeezing ![]() ![]() ![]() Group: Members Posts: 73 Joined: 14-February 08 Member No.: 86 |
When a customer insists on having a external links open in a new window (because sometimes they do) I use this javascript.
|
|
|
Mar 9 2008, 09:31 PM
Post
#4
|
|
![]() Don deluzione ![]() ![]() ![]() ![]() ![]() Group: Team Leaders Posts: 860 Joined: 13-February 08 From: 10km from nowhere and just south of nothing Member No.: 7 |
well.. actually, what I meant is: Open links in a new window or not? Method doesn't matter, I was just aiming for the new window-thing..
-------------------- |
|
|
Mar 9 2008, 10:19 PM
Post
#5
|
|
![]() Squeeze Machine ![]() ![]() ![]() ![]() ![]() Group: Team Leaders Posts: 568 Joined: 13-February 08 From: Catching the squeezed drips downunder. Member No.: 13 |
A general rule used for corporates (big companies and their website) is to open any in-link or affilliate company link in the same window with all other links opening in a new one. There is a feeling linking to external companies within the same window infers some connection between the linker and linkee website (which could be of detriment to the brand).
Obviously, the XHTML recommendation is that all links open in the same window -- hence why target="" was removed from the specification. I think it's complete overkill to use javascript to open new windows though -- if you want it to open in a new window, use target="_blank" and cop the validation error, no need to undercut the recommendation with javascript (that won't work when javascript isn't available anyway). I perceive the general feeling of web users is new windows are annoying and as more sites adopt the current web standards, new window links are decreasing in number. My suggestion would be, unless there's a visibly logical reason to do so, don't open links in a new window. -------------------- Bright Idea? -- Don't Let it disappear
|
|
|
Mar 10 2008, 06:11 AM
Post
#6
|
|
![]() Co-Founder ![]() ![]() ![]() ![]() ![]() ![]() Group: Co-Founders Posts: 2,476 Joined: 13-February 08 From: Pink House in USA Member No.: 3 |
I have never found the deletion of the target="blank" necessary. I use it so infrequently that I am willing to overlook the error in validation for the ease of use for my clients. I only open links to outside sites using this method as I do not want to loose the path back to my clients' site.
The W3C thinks it's a bad method, however used wisely and not too often it's fine imo. Before you say "They can open it in another tab"? Well many many web users have no idea how to use browsers effectively so to expect them to even know how to right click is asking too much. Trust me, I am of a different generation and this generation is not too computer savvy. -------------------- The Squeeze Shop is OPEN! I just ordered my awesome shirts! Did you?
Maine-ly Web Design | My Photography | Twitter ME Become a Fan on Facebook | Check out Stumbleupon |
|
|
Mar 10 2008, 06:57 AM
Post
#7
|
|
![]() Squeezing ![]() ![]() ![]() Group: Members Posts: 73 Joined: 14-February 08 Member No.: 86 |
I only open links in new windows if the client requests it (I have one client that insists on external links be opened in an iframe on his site...gack!).
As for javascript vs target tag, I consider opening a new window to be a "behavior" so into javascript it goes. I like to follow the html=>content, css=>presentation and javascript=>behavior model. |
|
|
Mar 10 2008, 07:02 AM
Post
#8
|
|
![]() Squeeze Machine ![]() ![]() ![]() ![]() ![]() Group: Team Leaders Posts: 568 Joined: 13-February 08 From: Catching the squeezed drips downunder. Member No.: 13 |
If all behaviour is to be handled by javascript then what is to say that opening a link in the same window is not a behaviour? Even the way form elements and the scrolling of the window works?
Each to their own of course but every rule, including the your very valid method above (which I also follow), has room for interpretation -- such is the beauty and freedom available to us. -------------------- Bright Idea? -- Don't Let it disappear
|
|
|
Mar 10 2008, 08:50 AM
Post
#9
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Group: Members Posts: 156 Joined: 15-February 08 From: US of A Member No.: 150 |
Here's the problem using Javascript to open a new window. Pop-up blockers... They don't like javascript pop-ups. Target="_blank" gets by almost every single pop-up blocker. So that's something to keep in mind. Yes I know it's invalid mark-up as of 3 month's ago or whatever, but usability is always my #1 concern.
When do you use a new window? Like mentioned above if your leaving your current site and linking to another its great. Another great way to avoid this is to have a redirecting page. It's a page that states "You are leaving this website". That way you can avoid it altogether. I personally only use new window's if I am opening up a Word Document, or a PDF file. That's it. I never ever no matter what pop open another web page. I think if my user wants to open it in a new window they can do it on their own. -------------------- Currently Available for work: - XTHML, CSS, Flash, Actionscript, PHP, ASP, Ajax -
interested in movies? Read some of my reviews on my blog |
|
|
Mar 10 2008, 02:40 PM
Post
#10
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Group: Members Posts: 173 Joined: 19-February 08 From: Netherlands Member No.: 172 |
I guess I don't agree with a lot here. I think links to external pages should always be opened in a new window.
Why? Do you really want it to be up to the knowledge of your visitor to use a short-cut key or right mouse button? If they don't know how, or are too lazy, you've lost yourself a visitor. *However*... I do think links to external pages should be placed on places where they can be expected. For example... your external links page! Or when you say "This article came from the following source: <link>". Everyone knows then that you'll be redirected to an external link. For sake of usability I would actually even recommend using a new window. W3C standards aren't the guidelines to usability. And using javascript for this? I personally don't do that. I get the feeling if you do that, you make "creating xhtml strict" a goal, instead of a guide tool. But this is just my opinion. This post has been edited by velo: Mar 10 2008, 02:41 PM -------------------- fresh-style.nl - small webdesign & development projects |
|
|
Mar 10 2008, 03:09 PM
Post
#11
|
|
![]() Don deluzione ![]() ![]() ![]() ![]() ![]() Group: Team Leaders Posts: 860 Joined: 13-February 08 From: 10km from nowhere and just south of nothing Member No.: 7 |
you could use an "open in new window-icon" Like Wikipedia does on the external links..
-------------------- |
|
|
Mar 10 2008, 03:13 PM
Post
#12
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Group: Members Posts: 173 Joined: 19-February 08 From: Netherlands Member No.: 172 |
you could use an "open in new window-icon" Like Wikipedia does on the external links.. Are you giving advise to yourself now? Man you must really be bored. Seriously. I'd think that's a nice additional solution indeed. It would underline my idea of 'making clear the user knows what to expect'. -------------------- fresh-style.nl - small webdesign & development projects |
|
|
Mar 10 2008, 05:05 PM
Post
#13
|
|
![]() Co-Founder ![]() ![]() ![]() ![]() ![]() ![]() Group: Co-Founders Posts: 2,476 Joined: 13-February 08 From: Pink House in USA Member No.: 3 |
Does anyone know the official reason why the W3C calls the target="blank" deprecated?
This is the first time in my use of forums where people have actually been honest I believe and admitting to actually using it. Refreshing... I guess I like people agreeing with me. -------------------- The Squeeze Shop is OPEN! I just ordered my awesome shirts! Did you?
Maine-ly Web Design | My Photography | Twitter ME Become a Fan on Facebook | Check out Stumbleupon |
|
|
Mar 10 2008, 05:16 PM
Post
#14
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Group: Members Posts: 173 Joined: 19-February 08 From: Netherlands Member No.: 172 |
Does anyone know the official reason why the W3C calls the target="blank" deprecated? This is the first time in my use of forums where people have actually been honest I believe and admitting to actually using it. Refreshing... I guess I like people agreeing with me. Do you really think people lie about using target="_blank"? Is that a pride thing or will they be affraid that someone will call a fightteam of W3C that'll knock on their doors. What's the point in lying about it. Anyway, I actually don't know the official reason. If someone knows of an article about it, maybe (s)he can post it here. -------------------- fresh-style.nl - small webdesign & development projects |
|
|
Mar 10 2008, 05:30 PM
Post
#15
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Group: Members Posts: 173 Joined: 19-February 08 From: Netherlands Member No.: 172 |
Hm, although I don't like to admit it, I did some quick research, and ended up on Jakob Nielsen's site (who is ofcourse usability guru). He really considers it a design mistake to open a new window, based mainly on the idea that you are "breaking or slowing down the back button".
When you read up on it, it does make sense. Pages discussing the issue: http://diveintoaccessibility.org/day_16_no...ew_windows.html and http://www.useit.com/alertbox/990530.html (Jakob Nielsen) (Don't be alarmed if this forum opens a new window... I'm sure it will). -------------------- fresh-style.nl - small webdesign & development projects |
|
|
Mar 11 2008, 03:16 PM
Post
#16
|
|
![]() Squeezing ![]() ![]() ![]() Group: Members Posts: 66 Joined: 13-February 08 From: Mesa Arizona Member No.: 26 |
Does anyone know the official reason why the W3C calls the target="blank" deprecated? They're extremely bored -------------------- DirectAZ LLC - Small Business Web Design
TextCall - SMS Website Contact Solutions |
|
|
Mar 11 2008, 03:59 PM
Post
#17
|
|
![]() Don deluzione ![]() ![]() ![]() ![]() ![]() Group: Team Leaders Posts: 860 Joined: 13-February 08 From: 10km from nowhere and just south of nothing Member No.: 7 |
Hm, although I don't like to admit it, I did some quick research, and ended up on Jakob Nielsen's site (who is ofcourse usability guru). He really considers it a design mistake to open a new window, based mainly on the idea that you are "breaking or slowing down the back button". When you read up on it, it does make sense. Pages discussing the issue: http://diveintoaccessibility.org/day_16_no...ew_windows.html and http://www.useit.com/alertbox/990530.html (Jakob Nielsen) (Don't be alarmed if this forum opens a new window... I'm sure it will). I think Jakob needs to brush up.. QUOTE Opening up new browser windows is like a vacuum cleaner sales person who starts a visit by emptying an ash tray on the customer's carpet. Don't pollute my screen with any more windows, thanks (particularly since current operating systems have miserable window management). If I want a new window, I will open it myself! Since the introduction of tabbed browsing I don't feel my OS is cluttered anymore.. -------------------- |
|
|
Mar 11 2008, 10:52 PM
Post
#18
|
|
|
Squeezing ![]() ![]() ![]() Group: Members Posts: 72 Joined: 16-February 08 Member No.: 157 |
Anne Van Kesteren's take on this:
Links in new windows (target="blank") considered harmful James This post has been edited by jamesicus: Mar 11 2008, 10:53 PM -------------------- Interoperable Web Pages - Always with validated HTML/XHTML/XHTML+RDFa, CSS, RDF, XML, RSS
Elegant Italic Handwriting - Roman Coins of the London Mint - WW2 Air Raids, V1s & Aircraft crashes |
|
|
![]() |






Mar 9 2008, 08:18 PM











