Tutorial :JavaScript enabled/disabled in browser



Question:

How to find whether a user has enabled or disabled JavaScript in the browser or the browser does not support JavaScript?


Solution:1

Actually this is no direct way to detect javascript enable/disable. Go through below article explain how to detact javascript enable or disable

Detect if JavaScript is enabled in ASPX


Solution:2

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.


Solution:3

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.


Solution:4

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.


Solution:5

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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »