|The Script Element|
Language Attribute is deprecated!
18.2.1 The SCRIPT element [w3.org]
Why is it that developers of Scripts continue to use the deprecated...
...when the correct element to use is...
Am I missing something? If I'm not, why do developers continue to use the deprecated language tag? I'm finding it in many statistical programs, free scripts, etc.
|language = cdata [CI] |
Deprecated. This attribute specifies the scripting language of the contents of this element. Its value is an identifier for the language, but since these identifiers are not standard, this attribute has been deprecated in favor of type.
I think different reasons. Some because they don't know it's depreciated. Some know but if it's not broken, don't fix it. Others might be keeping IE happy, see Remarks:
|Others might be keeping IE happy, see Remarks: |
Thanks gph, I've read that before and it raises questions.
|Whenever the language attribute is not defined on the SCRIPT object, then MSHTML attempts to select a suitable scripting engine. An error generally occurs if the wrong scripting engine is selected. |
Scripting is not my forte. But, how often would the wrong scripting engine be selected? And, why would the W3C mark the attribute as deprecated?
|When more than one SCRIPT object is used on a page, it can be necessary to specify the language attribute for each SCRIPT object, and doing so is always recommended. |
Okay, so MS are recommending that I utilize deprecated markup for instances where more than one SCRIPT object is used. That just doesn't seem right to me. I've been stripping away those language attributes for years and can say that I've never seen any adverse effects.
Is this something you can shed a little more light on? I mean, if the attribute is deprecated, what purpose is it serving? I've read the MS Remarks numerous times and I just can't get it to sink in. :(
I have never ever had any problems with IE picking the wrong language.
I have not used the language attribute for years.
|I have never ever had any problems with IE picking the wrong language. |
Are the differences in the languages that different? I mean, I've seen 1.1, 1.2, 1.3, 1.4, etc. No need to get into detail but, what's the major difference between the language versions? And why would I want to use one as opposed to the other?
The only time you would run into a problem with functionality in older browsers is if you are trying to cater to IE3/4 or NN4
This is why most newcomers appear unaware of literal notation for Objects and Arrays, and of the array methods that MS added (belatedly) in IE5.5. It's also why we still get people using eval all over the place (and that was never necessary anyway!).
Re: specifying language version