Forum Moderators: open

Message Too Old, No Replies

target="_blank" future validity

How long will "target" work?

         

Eighteen

4:10 pm on Nov 26, 2004 (gmt 0)

10+ Year Member



I understand that "target" is not supported in HTML or XHTML Strict however it is still valid with HTML or XHTML Transitional.

If i write a document in XHTML 1.0 transitional that uses target="_blank" is there any way of making a good estimate of how long it will be accepted by future browsers?

Am I worried about nothing?

I need to keep JavaScript out of the code for simplicity and backwords compatability with potential users.

This is being burned to a CD product therefore, I want to either give my customer some timeframe in which it will still work or provide a backup solution.

encyclo

4:28 pm on Nov 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com], Eighteen.

It will work for the forseeable future, and when (or if) it ever stops working, it won't break anything anyway.

The simple deal is that less than 1% of the current web is in XHTML, and less than 1% of that 1% is valid XHTML. So, transitional or even "tag soup" markup isn't going away, and browsers will still cater for it.

In the eventuality of

target="_blank"
suddenly not being supported in the future, the worst that could happen is that the attribute won't be recognized, and will therefore be ignored - so you link would open in the same window, which is far from calamitous. It may well happen for a future user agent or operating system which does not use the concept of "windows".

If

target="_blank"
is what you need, I would go for it without any hesitation. You say this is for a CD-based product: most likely, CDs will have gone the way of vinyl before you'll have any issues.

Eighteen

7:30 pm on Nov 26, 2004 (gmt 0)

10+ Year Member



Thanks encyclo. I'm glad to be a member.

That also answers my question of what may happen when it does go away. My quess also is that the "target" will just be ignored and it will open in the same window.

However, I will still use a backup link that does not use "target" just in-case any user has trouble with it and doesn't take the time to open the readme file for help. (For example, a pop-up blocker that may treat it as a dead hyperlink.)

BjarneDM

5:58 pm on Nov 27, 2004 (gmt 0)

10+ Year Member



the solution is here:
[sitepoint.com...]

tedster

10:49 pm on Nov 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



We looked at that particular solution here when it was first published:
[webmasterworld.com...]

But as the original post says:

I need to keep JavaScript out of the code for simplicity
and backwords compatability with potential users.

This is an exercise in total silliness as far as I can see. A what price and for what purpose do we need "valid" mark-up? And using a "rel=" attribute with a non-standard argument? - seriously folks, this is over-the-top pedanticism of the worst kind.

If the target attribute is used, and it is the only non-valid element, no current browser will have a problem. But if a javascript solution is used, the mark-up may get the "gold star of validation" but a good chunk of real-world users WILL have a problem.

The gold badge of validation is not my ruler, but my tool.