W3C home > Mailing lists > Public > www-html@w3.org > November 2003

Re: <link> vs. <script> for external scripts

From: Christian Wolfgang Hujer <Christian.Hujer@itcqis.com>
Date: Tue, 18 Nov 2003 20:46:38 +0100
To: Andy Holmes <aholmes84@shaw.ca>, www-html@w3.org
Message-Id: <200311182046.40910.Christian.Hujer@itcqis.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Andy, dear list members,

Am Dienstag, 18. November 2003 19:15 schrieb Andy Holmes:
> A couple of people were having a discussion on IRC the other day about
> the fact that <script> is used with a 'src' attribute to include
> external scripts rather than the link element. It seems to me more
> consistant and logical to use <link> for external resources like this
> and <script> for in-document scripts, such as <style> and <link> have a
> relationship for stylesheets.
>
> The only thing that is actually missing for <link> to be properly used
> is the 'script' link-type. The 'src' attribute on the <script> element
> could probably be deprecated if this link-type was added since it
> wouldn't be necessary anymore.
I agree there's some anomaly regarding <script/>.
But on the other hand, style sheets apply to the document as such while 
scripts can be included in a certain place.
That's why <link/> is only allowed to be a child of <head/>, while <script/> 
can be a child of nearly anything.

I for my part therefor think, <script/> cannot be replaced by <link/>.
But I agree that for consistency, a LinkType Script should be defined to be 
able to include scripts using <link rel="Script" href="..." 
type="text/javascript" />.


Bye
- -- 
ITCQIS GmbH
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter (Shareholding CEO)
Telefon: +49  (0)89  27 37 04 37
Telefax: +49  (0)89  27 37 04 39
E-Mail: Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/uncgzu6h7O/MKZkRAvo7AJwIeQYvUo2ybUzn5x7O812VbqmzVACdG0d6
oeL2S+gt0zPssomIoSEOiIQ=
=6yj4
-----END PGP SIGNATURE-----
Received on Tuesday, 18 November 2003 20:41:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:40:10 UTC