|
|
Up |
|
|
  |
Author: howahowa Date: Jun 4, 2008 10:17
Just found a funny things..
in HTML4's dtd, http://www.w3.org/TR/html4/strict.dtd
language is not valid, i.e.
charset %%Charset; #IMPLIED -- char encoding of linked
resource --
type %%ContentType; #REQUIRED -- content type of script
language --
src %%URI; #IMPLIED -- URI for an external script
--
defer (defer) #IMPLIED -- UA may defer execution of
script --
event CDATA #IMPLIED -- reserved for possible future
use --
for %%URI; #IMPLIED -- reserved for possible future
use --
>
But in XHTML, language is valid (although type is still required)
|
| Show full article (1.14Kb) |
|
| | 8 Comments |
|
  |
Author: C A UpsdellC A Upsdell Date: Jun 4, 2008 10:19
howa wrote:
You're comparing apples and oranges: strict and transitional.
|
| |
|
| | no comments |
|
  |
Author: howahowa Date: Jun 4, 2008 10:31
On Jun 5, 1:19 am, C A Upsdell wrote:
> howa wrote:
>> Just found a funny things..
>
>
>> language is not valid, i.e.
>
> You're comparing apples and oranges: strict and transitional.
Oh...I have misread that!
So change the topic:
Why language is allowed in transitional, but not strict ?
Howard
|
| |
| no comments |
|
  |
Author: Rik WasmusRik Wasmus Date: Jun 4, 2008 12:12
On Wed, 04 Jun 2008 19:31:34 +0200, howa gmail.com> wrote:
> On Jun 5, 1:19 am, C A Upsdell wrote:
>> howa wrote:
>>> Just found a funny things..
>>
>>
>>> language is not valid, i.e.
>>
>> You're comparing apples and oranges: strict and transitional.
>
> Oh...I have misread that!
>
> So change the topic:
>
> Why language is allowed in transitional, but not strict ?
|
| Show full article (0.91Kb) |
| no comments |
|
  |
Author: howahowa Date: Jun 4, 2008 20:35
Hi
> Because it's deprecated, so it will be in many old documents, and while
> TRANSITIONING to a new DTD/version, it can be many of them are still not
> 'caught'/altered. The moment of complete compliance, as soon as you're
> done transitioning, you also have replaced all the language attributes
> with type-attributes, and you can use STRICT. Using transitional for html
> not transitioning is just silly...
> --
> Rik Wasmus
> ...spamrun finished
Interesting questions would be
1. Who created it? Why removed finally?
2. `type` is required even at HTML4 dtd, why people are only using
`language`? (Due to incorrect implementation of Dreamweaver /
Frontpage for example?)
Howard
|
| |
| no comments |
|
  |
Author: C A UpsdellC A Upsdell Date: Jun 4, 2008 22:21
howa wrote:
>> Because it's deprecated, so it will be in many old documents, and while
>> TRANSITIONING to a new DTD/version, it can be many of them are still not
>> 'caught'/altered. The moment of complete compliance, as soon as you're
>> done transitioning, you also have replaced all the language attributes
>> with type-attributes, and you can use STRICT. Using transitional for html
>> not transitioning is just silly...
>> --
>> Rik Wasmus
>> ...spamrun finished
>
> Interesting questions would be
>
> 1. Who created it? Why removed finally?
> 2. `type` is required even at HTML4 dtd, why people are only using
> `language`? (Due to incorrect implementation of Dreamweaver /
> Frontpage for example?)
|
| Show full article (0.91Kb) |
| no comments |
|
  |
Author: Jukka K. KorpelaJukka K. Korpela Date: Jun 4, 2008 22:51
Scripsit C A Upsdell:
> Netscape 4 did not support TYPE, so LANGUAGE had to be used until
> Netscape 4 became extinct
Since Netscape only supported JavaScript as the scripting language, no
attribute was needed to tell it that the language is JavaScript.
The LANGUAGE attribute was introduced by Netscape to indicate JavaScript
_version_, and if you wish to do that, you still need that attribute,
since the TYPE attribute does not allow that. (More exactly, the
Internet media types for JavaScript do not allow any version to be
specified.)
It was (and still is) possible to write e.g. one SCRIPT element with
LANGUAGE="JavaScript1.2" and another one with LANGUAGE="JavaScript1.3"
so that a browser that only supports JavaScript 1.2 ignores the latter.
This was never a particularly good idea, but that's the story behind
LANGUAGE.
In practice, neither TYPE nor LANGUAGE is needed, since browsers assume
by default that the language is JavaScript. But if you do specify one of
those attributes and with a _wrong_ (e.g., misspelled) value, your
script may well be ignored.
|
| Show full article (1.15Kb) |
| no comments |
|
  |
Author: howahowa Date: Jun 4, 2008 23:28
On 6ζ5ζ₯, δΈε1ζ21ε, C A Upsdell wrote:
> howa wrote:
>
> Netscape 4 did not support TYPE, so LANGUAGE had to be used until
> Netscape 4 became extinct, and even when it had become extinct, many
> people continued to use LANGUAGE, perhaps out of habit.
Definitely a bad habit, even Mozilla don't use LANGUAGE in their web
site now.
Howard
|
| |
| no comments |
|
  |
|
|
  |
Author: C A UpsdellC A Upsdell Date: Jun 5, 2008 10:14
Jukka K. Korpela wrote:
> Scripsit C A Upsdell:
>
>> Netscape 4 did not support TYPE, so LANGUAGE had to be used until
>> Netscape 4 became extinct
>
> Since Netscape only supported JavaScript as the scripting language, no
> attribute was needed to tell it that the language is JavaScript.
It was actually more complex than that. Netscape 4 was rife with bugs,
some of which appeared in most (or all) versions of Netscape 4, and some
of which appeared only in certain versions. And one of the bugs was
that, when the LANGUAGE attribute was not specified, Netscape would
*sometimes* parse the HTML improperly.
I never did figure out all the factors which led Netscape 4 to misbehave
-- there were SO many -- but I did discover some common factors, and I
developed defensive design techniques which minimized the problems. One
defensive technique was to always include the LANGUAGE attributes. No
doubt there were many cases where it did not matter, but designing
defensively minimized the instances when it did, saving me much time.
|
| |
| no comments |
|
RELATED THREADS |
  |
|
|
|