5 ms·
I can't speak for HN's motivations, but my view as a web developer has always been that, in general, target="_blank" is bad. My reasoning is twofold: 1) It's un
by unfletch 13y ago
I can't speak for HN's motivations, but my view as a web developer has always been that, in general, target="_blank" is bad. My reasoning is twofold: 1) It's unnecessary. Opening a link in a new tab is easy for the user to do with a keyboard modifier, if that's what they want. 2) Worse, when you use target="_blank" you force that behavior on every user. There's no keyboard modifier to negate that behavior and keep the link in the same window.
- ScottWhigham 13y agoOpening a link in a new tab is easy for the user to do with a keyboard modifier Yes, on a desktop or laptop computer. Not so easy on a phone/tablet. I don't think it's bad in the least, not unless it's overused or used improperly. If a "login" link opens a new window, that's obviously poor use. If it's a link along the lines of "view this supporting article that's on another site, then come back here and join the discussion", clearly you want a new window opened - both the author and the reader want that done. Does the target site hijack the "back" button in the browser? Who cares - I've opened a new window/tab and, when I'm done, I'll close it and return to the article I was reading.
- unfletch 13y ago"Yes, on a desktop or laptop computer. Not so easy on a phone/tablet." I've never used Android, but it's dead simple in iOS. Just tap and hold.
- ScottWhigham 13y agoSame in Android.
- tehwebguy 13y agoSort of the opposite in my opinion - you can tap + hold on iOS but closing a window and going back to the previous one is way more of a pain than cmd + w on my computer.
- wikwocket 13y agoAlso, it breaks the back button. However, there are use cases for it. It really depends on the application, the use case, and the target audience.