[thelist] <noscript> in <head>

Mike Combs thelist at lists.evolt.org
Wed May 1 19:29:00 2002


I'm trying to use cookies to select the stylesheet used on my web site.  In
the interest of graceful degradation and backwards compatibility and people
who hate popups, I'd like to assign a default stylesheet to be loaded for
users without Javascript enabled.

The JavaScript does a "document.write" to load the stylesheet based on the
cookie.  For non-JavaScript users, I put a stylesheet into a <noscript>
tag.  But this doesn't validate under XHTML... <noscript> is only allowed
in the body.

Can anyone figure a "valid" workaround?


<head>
...
<noscript>
<link rel="stylesheet" href="/css/nugc-other1.css" type="text/css" />
</noscript>
<script type="text/javascript" language="JavaScript"
src="/js/load-css.js"></script>
...
</head>

Thanks in advance!
...mike