How to find whether a user has enabled or disabled JavaScript in the browser or the browser does not support JavaScript?
5 Answers
Actually this is no direct way to detect javascript enable/disable. Go through below article explain how to detact javascript enable or disable
2 Comments
There is no way, but it shouldn't concern you.
Design your pages so they work properly without any javascript. When you're done, add unobtrousive javascript that will "override" links or submits behaviour so the js enabled users will get the nice js features, and for those with no js support the site will nicely degrade to the standard features.
2 Comments
There is not really a reliable way to do this. Besides it's up to the user of the browser to enable javascript or not. Try to make your site in such a way that it downgrades gracefully to a state where it doesn't have to support javascript but still can have the most important functionality.
Html also provides the < noscript> element in which you could state to the user that (s)he could turn on javascript to have a better experience. But still it's up to him/her to do so.
Comments
You can a <script> tag to that sends users to a page that uses Javascript.
For example: (in your <head>)
<script type="text/javascript">
location.replace("JavaScript-Enabled.aspx");
</script>
However, the proper way to handle this is to allow your pages to work both with and without Javascript.
1 Comment
There isn't really a stable way, but you could do something like having Javascript send a message to your server which will set a flag there. If the message is not sent, you know Javascript is disabled.