Live data from Hacker News

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

kyrylo.org

121–130 of 203 posts

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

#121

Earlier quoted context omitted.

> Actually, frames were ugly, limited and not really ergonomic but they weren’t a wrong pattern. They were. The most fundamental part of the WWW architecture is the URL. URLs are more important than even HTML or HTTP. Without addressability, the web doesn’t work. Frames break URLs because you can visit a site that uses frames, navigate around the site, and the URL won’t change. You can’t link to the place you arrive…

There were workarounds to load a direct link to a frame so that it loaded properly in the frameset. If you visited a site that did not do that, then they were just not trying as hard.

This is true, but back then we didn't have the JS History API so navigating throughout a frame-based website would never update the URL in the address bar to reflect where the user is.

Whether or not you see it as a big deal is up to you, but I personally have vivid memories of receiving links from users who were trying to share or show me a particular page, only to realize that they had copied the address bar's content of a framed website.

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

#122

Tangential, but I would really like frames to come back for incremental document updates, like LiveView/Hotwire/HTMX. You can just start working like that today with one of those libraries, but it would be so neat to have a common standard for describing an update to a targeted frame.

The main problem with frames is that you need to use JS to get it to be responsively sized. If they would fix that, frames would be perfect. They actually do what people just think Web Components do. I.E. they are actually isolated from the styles of the host page and have an actual security boundary preventing malicious execution.

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

#124
Are there still legitimate uses for the target attribute, other than _blank?

Framesets are obviously out of date, but the target attribute can also be used to always open some links in the same tab with that target name, i.e. not to open a new one when it already exists. Not sure whether this has much of a modern use case.

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

#125

Tangential, but I would really like frames to come back for incremental document updates, like LiveView/Hotwire/HTMX. You can just start working like that today with one of those libraries, but it would be so neat to have a common standard for describing an update to a targeted frame.

What are you missing by using iframes (still standard, supported, working) + css for layouting that old school frames would give you?

The targeting for updates. Something like hotwire/turbo frames allows you to push a form's response to any turbo-frame. You can also push updates to multiple frames at once. They're matched by frame ID, much like target="", but in the case of iframes, the iframe is the only thing that can update the interior HTML. (other than just changing the URL from the parent application)

iframes are also in a rather locked-down security model, even if they exist on the same domain. (Requires message passing, strict CORS rules, strict cookies rules etc)

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

#127
post #108

I haven't done much with HTML for years so I had no idea that modern browsers use "_blank" to open a page in a new tab instead of a new window. This genuinely surprised me, seems like unexpected behaviour or a regression/bug. :)

The last browser that did that was the infamous Internet Explorer 6.

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

#129

[flagged]

Welcome to Hacker News.

Defaulting to kindness, curiosity, and respect will help you get heard. I read the code included version of this comment and it seemed you had some potentially interesting contributions to add to the conversation.

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

#130

Earlier quoted context omitted.

http://hinloopen.nl/be499.html Enjoy! (check the source)

A true modern blast from the past! Are you still using the original Claris Home Page software to maintain the website?

My father is, yes. I think he still uses his old Powerbook G4 with the old 30" cinema display for that website. He also has an ancient version of photoshop on there, hah.

He also has a bunch of wordpress websites. He's scared to change his "main" website because it might break SEO or bookmarks or incoming links.

He has 2 laptops on his desks; one modern M-based macbook and that ancient powerbook. He also has a black apple laptop that I think is a G3, and it still worked (a few years ago, last time it came up)

Post reply on HN