Detect if Javascript is disabled?
Moderator: General Moderators
Detect if Javascript is disabled?
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?
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.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.
Re: Detect if Javascript is disabled?
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>There are 10 types of people in this world, those who understand binary and those who don't
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Detect if Javascript is disabled?
Huh...Vlad...you've done it again...such an obvious solution and yet I have always used
I love when solutions are simplified... 
Code: Select all
<noscript> <img src="some.php" /></noscript>