Why does target="_blank" have an underscore in front? (2024)
21–30 of 203 posts
Re: Why does target="_blank" have an underscore in front? (2024)
#22Re: Why does target="_blank" have an underscore in front? (2024)
#23Minor nitpick: browsers used _blank as a special directive to open the link in a new “window”, not a tab. Browsers didn’t have tabs back then, well other than Opera 4.x which was a paid software which never cracked 3% marketshare.
Re: Why does target="_blank" have an underscore in front? (2024)
#24Re: Why does target="_blank" have an underscore in front? (2024)
#25The answer is a little unsatisfying to me. It says that "blank" ca be a frame name, but doesn't say why "_blank" can't be.
To me (and I’m of the era they’re describing so I used it a lot) it’s simply that _blank is a reserved keyword that means open the link in a new, unnamed window.
Other reserved keywords for “target” are _self (default value), _parent, and _top.
Re: Why does target="_blank" have an underscore in front? (2024)
#26The answer is a little unsatisfying to me. It says that "blank" ca be a frame name, but doesn't say why "_blank" can't be.
I'd be interested to hear either a citation proving or disproving that guess though.
Re: Why does target="_blank" have an underscore in front? (2024)
#27Earlier quoted context omitted.
Should it really be up to the Website designer to decide? On Firefox I have the "Send Link to Device" context action that allow me to open a link on my Phone or Desktop.
In my product we have a photo app and for normal people it is just easier to have the transferred to the phone than to use a desktop computer (without a camera) to grab a picture. We use QR codes to transfer the user - a solution would need to be as simple as that (Ie. not requiring the user to be logged in on the same browser or other shenanigans). The current solution is a hasle, but works well - I can't envision h…
Re: Why does target="_blank" have an underscore in front? (2024)
#28Re: Why does target="_blank" have an underscore in front? (2024)
#29Because “blank” can be a real frame name if you want to make your codebase a little harder on purpose. You still see _blank for links opening in new windows, but _parent, _self, etc not so much anymore.
The title of the post isn't asking HN users a question