Page 1 of 1

Detect if Javascript is disabled?

Posted: Wed Feb 25, 2009 4:09 am
by Sindarin
How can I detect if Javascript is disabled? The <noscript> tag works but everyone on the web says it shouldn't be used because it's a deprecated tag.

Re: Detect if Javascript is disabled?

Posted: Wed Feb 25, 2009 4:18 am
by onion2k
Sindarin wrote:How can I detect if Javascript is disabled? The <noscript> tag works but everyone on the web says it shouldn't be used because it's a deprecated tag.
I don't think there's an alternative so I just use it regardless. I don't care what "everyone" says, I care whether or not it works.

Re: Detect if Javascript is disabled?

Posted: Wed Feb 25, 2009 4:57 am
by VladSun
If you are going to use it server side, you may inverse it:

Code: Select all

<script src="set__js_enabled__in__session.php"></script>
;)

Re: Detect if Javascript is disabled?

Posted: Fri Feb 27, 2009 12:05 am
by alex.barylski
Huh...Vlad...you've done it again...such an obvious solution and yet I have always used

Code: Select all

 <noscript>  <img src="some.php" /></noscript> 
I love when solutions are simplified... :D