News for hackers. Stuff that matters.
Re:Ask YC: How do you deal with external urls? by walesmd on Wednesday May 07, 2008 @03:33AM (#183235)
Never open a new window automatically - let the user middle-click.
Re:Ask YC: How do you deal with external urls? by axod on Wednesday May 07, 2008 @04:25AM (#183254)
Several exceptions to this.

For example, links received in email, if you view the email via a webmail client gmail for instance, and click on the link, it will open in a new window.

I think it depends on the % of users that will want to go back to your app after looking at the link. And with ajax type apps, the back button just doesn't cut it.

Re:Ask YC: How do you deal with external urls? by dhimes on Wednesday May 07, 2008 @08:34AM (#183321)
I don't know about "never." I spend a lot of money getting users to my site (I'm not web 2.0, but rather a downloadable software product). I'm not eager to send them elsewhere. That's one of my gripes about xhtml 1.0 strict: target="_blank" doesn't validate. So, my site is all strict except the links page, which has to be transitional to validate.
Re:Ask YC: How do you deal with external urls? by handelaar on Wednesday May 07, 2008 @01:43PM (#183548)
It doesn't validate because breaking my preferences and opening a new window which I didn't ask for is (apart from being an obnoxious thing to do) a 'behaviour'.

The "Strict" standard, rightly, enforces a division between content (XHTML), design (CSS) and behaviour ({Java|ECMA}script).

If you want links to open in external windows, attach a behaviour to the link class with JS. Just make sure that behaviour is off by default, though, because otherwise people like me who know what we're doing won't use your site.

Re:Ask YC: How do you deal with external urls? by dhimes on Thursday May 08, 2008 @08:35AM (#184429)
I don't use JS on my site, because others won't use the site with JS. The link page is the only page on the site that does this, so I'm going to go with it.

It's not obnoxious if you consider that some people really don't understand how the web works or what the difference is between sites. In that case it's a convenience.

This is an idea which should be left as a "best practice," but allow for reasonable differences.