Link rel = "script" use

I am reading XHTML 1.0 Strict Doctype and found out that there is a value for the attribute in the element . "script"rellink

<link rel="script" href="..." />

I tried using this tag to link external JS files, but Safari doesn't even download the file. So what can you use a tag for?

Update:

After re-reading the DTD, it does not exactly display the valid values ​​for the attribute rel. The value 'script'appears only as an example of a comment. Thus, this may or may not be implemented in all browsers.

+3
source share
5 answers

link .

spec:

LINK , , .

, .

+5

"script", "rel" . :

  • ( , XHTML 1.0)?
  • ?

, W3C , (<link rel="Stylesheets" …>), , DTD. HTML 4.01 DTD (XHTML 1.0 - HTML 4.01 XML). , script. , .

2. , , Safari ( ). , -. ( , Safari), , , Safari .

+4

js <script>:

<script type="text/javascript" src="/foo.js"></script>
-1

javascript, :

<script type="text/javascript" src="/path/to/file.js"></script>

, CSS:

<link rel="stylesheet" type="text/css" ref="myFile.css"/>
-1

Source: https://habr.com/ru/post/1763209/


All Articles