Live data from Hacker News

Why does target="_blank" have an underscore in front? (2024)

kyrylo.org

131–140 of 203 posts

Re: Why does target="_blank" have an underscore in front? (2024)

#131
I went digging in W3C archives to find relevant discussions. There are 4 reserved target names: _blank, _parent, _self, _top.

- 1995 Sept https://web.archive.org/web/19990202141025/http://home.mcom.... Netscape Navigator 2.0a2 release notes including rollout of TARGET.

- 1995 Sept https://lists.w3.org/Archives/Public/www-html/1995Sep/0034.h... First definition of them; spec text provided by "the Netscape Navigator marketing guy".

- 1997 Jan https://www.w3.org/TR/2018/SPSD-html32-20180315/ HTML 3.2 published without frame target names specced.

- 1997 Aug https://lists.w3.org/Archives/Public/www-html/1997Aug/0010.h... Roles of these target names clarified

- 1997 Dec https://www.w3.org/TR/html401/types.html#h-6.16 HTML 4.0 published with target names.

I can't find any discussion about the choice of character. My guess is that discussion was internal to Netscape as they shipped _then_ specced link target names.

Re: Why does target="_blank" have an underscore in front? (2024)

#132
post #90

Earlier quoted context omitted.

HTML has a bunch of good stuff in it that'd replace the need for so much heavy and slow and non-native-feeling javascript if that'd just been improved. Lots of it's now rarely used because it sucks, but there's no good reason it has to suck. It's like whole sections of the spec just got abandoned around 2005, but the need is still there.

The tag needs to make a comeback; I'm so tired of having to write my own JavaScript to get annoying flashy text. In all seriousness, I'm not entirely sure why so many features in HTML are eschewed in favor of a slow JS mess. It doesn't feel like bolting on an entire relatively-slow programming language is going to make your code more organized than a relatively easy to use tag.

> I'm so tired of having to write my own JavaScript to get annoying flashy text

Fret no more:

    

        .blink { animation: blink 1s steps(2, start) infinite; }

        @keyframes blink { 50% { visibility: hidden; } }

    

    Lorem ipsum

https://jsfiddle.net/xrkLt2nz/

Re: Why does target="_blank" have an underscore in front? (2024)

#133
Why did we move away from this model of web development? If I remember back that far, it seems like fairly soon after this was when the meta starting telling us that frames were bad, and using was bad, etc.

It all honestly seemed a lot easier than what has come after.

Re: Why does target="_blank" have an underscore in front? (2024)

#134
post #105

Earlier quoted context omitted.

As another borrowed convention, JS developers of yore (and likely some today still) used an _ prefix to denote “private” function/methods. Quotes as it’s just a convention - today JS supports # for actual private members in class syntax.

This is a direct descendant of ActionScript. It introduced the convention of Instance._getter and Instance.__private.

What about Lingo?

Re: Why does target="_blank" have an underscore in front? (2024)

#137

Why did we move away from this model of web development? If I remember back that far, it seems like fairly soon after this was when the meta starting telling us that frames were bad, and using was bad, etc. It all honestly seemed a lot easier than what has come after.

It wasn't easier, but it was simpler. Fewer moving parts.

The reason we moved away from it was that after a point, the amount of legwork to implement relatively simple behaviours became astronomical. Whether or not the current state of matters is "better", who's to say. But things are certainly much easier now.

Besides, you still can use those old modes if you want to :)

Re: Why does target="_blank" have an underscore in front? (2024)

#138
post #90

Earlier quoted context omitted.

The tag needs to make a comeback; I'm so tired of having to write my own JavaScript to get annoying flashy text. In all seriousness, I'm not entirely sure why so many features in HTML are eschewed in favor of a slow JS mess. It doesn't feel like bolting on an entire relatively-slow programming language is going to make your code more organized than a relatively easy to use tag.

> I'm so tired of having to write my own JavaScript to get annoying flashy text Fret no more: .blink { animation: blink 1s steps(2, start) infinite; } @keyframes blink { 50% { visibility: hidden; } } Lorem ipsum https://jsfiddle.net/xrkLt2nz/

This is certainly better than nothing, but it should just be a tag! I shouldn't need this fancy new-fangled "CSS" fad to bail me out of the problems that W3C created by removing it in the first place!

Re: Why does target="_blank" have an underscore in front? (2024)

#139

Earlier quoted context omitted.

> I'm so tired of having to write my own JavaScript to get annoying flashy text Fret no more: .blink { animation: blink 1s steps(2, start) infinite; } @keyframes blink { 50% { visibility: hidden; } } Lorem ipsum https://jsfiddle.net/xrkLt2nz/

This is certainly better than nothing, but it should just be a tag! I shouldn't need this fancy new-fangled "CSS" fad to bail me out of the problems that W3C created by removing it in the first place!

Definitely. Much less the many several users who yet lack CSS support in their preferred browser.

Re: Why does target="_blank" have an underscore in front? (2024)

#140

Earlier quoted context omitted.

This is certainly better than nothing, but it should just be a tag! I shouldn't need this fancy new-fangled "CSS" fad to bail me out of the problems that W3C created by removing it in the first place!

Definitely. Much less the many several users who yet lack CSS support in their preferred browser.

The good news is that still works in the latest Firefox. No need for any new-fangled animation libraries for me.
Post reply on HN