Fixed standards compliance: text/javascript -> application/javascript
authorshort <>
Sat, 1 Oct 2005 05:22:35 +0000 (05:22 +0000)
committershort <>
Sat, 1 Oct 2005 05:22:35 +0000 (05:22 +0000)
Web.pm

diff --git a/Web.pm b/Web.pm
index 0885b11..2bf90bb 100644 (file)
--- a/Web.pm
+++ b/Web.pm
@@ -272,7 +272,11 @@ my($class,%args)=@_;
        if ($W->{"detect_js"} && !$W->{"have_js"}) {
                # Do not: <script />
                # as at least Lynx inhibits any further HTML output.
-               $W->{"head"}.='<script type="text/javascript" src="'.uri_escaped(path_web('/My/HaveJS.pm')).'"></script>'."\n";
+               # Do not: text/javascript
+               # as it does not look as registered, at least according to: MIME::Types $VERSION 1.15
+               # "application/javascript" so far standardized till 2005-12-08 by:
+               #       http://www.ietf.org/internet-drafts/draft-hoehrmann-script-types-03.txt
+               $W->{"head"}.='<script type="application/javascript" src="'.uri_escaped(path_web('/My/HaveJS.pm')).'"></script>'."\n";
                }
 
        do { _args_check(%$_) if $_; } for ($W->{"args_check"});
@@ -1110,7 +1114,11 @@ my($class)=@_;
 
        if (!$W->{"header_only"}) {
                header("Content-Style-Type"=>"text/css");
-               header("Content-Script-Type"=>"text/javascript");
+               # Do not: text/javascript
+               # as it does not look as registered, at least according to: MIME::Types $VERSION 1.15
+               # "application/javascript" so far standardized till 2005-12-08 by:
+               #       http://www.ietf.org/internet-drafts/draft-hoehrmann-script-types-03.txt
+               header("Content-Script-Type"=>"application/javascript");
                # $W->{"r"}->content_languages() ?
                do { header("Content-Language"=>$_) if $_; } for $W->{"language"};
                }
@@ -1202,8 +1210,12 @@ HERE
                if ($W->{"css_inherit"}) {
                        # Do not: <script />
                        # as at least Lynx inhibits any further HTML output.
+                       # Do not: text/javascript
+                       # as it does not look as registered, at least according to: MIME::Types $VERSION 1.15
+                       # "application/javascript" so far standardized till 2005-12-08 by:
+                       #       http://www.ietf.org/internet-drafts/draft-hoehrmann-script-types-03.txt
                        Wprint <<"HERE";
-<script type="text/javascript" src="@{[ uri_escaped(path_web('/My/css_inherit.js')) ]}"></script>
+<script type="application/javascript" src="@{[ uri_escaped(path_web('/My/css_inherit.js')) ]}"></script>
 HERE
                        }
                }