My application depends on JavaScript, I want to check the client browser's JavaScript is enabled or not and raise an alert message if its turned off.
On Google Chrome, JavaScript is enabled by default, but you can verify if it works through the Settings menu. To reveal the Settings menu, simply click on three tiny black dots at the top-right corner of your Chrome window.
There's actually a <noscript>
tag that you can use to display the content contained inside when javascript is not available.
Something like:
<noscript>
<div>
You must enable javascript to continue.
</div>
</noscript>
The div just won't show if they have javascript, and it's pretty easy to tell if javascript IS working, no matter whether you need it to ping your server back to let it know, or use it to perform some more advanced functions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With