0

how to detect event when user has disabled javascript in his browser, until the user reloads the page I can send a command to the server not to use javascript

Thanks for the answer. Consider this scenario, the user uploaded the page, then changed his mind to use javascript and changed the browser settings. The script is still running on the page until the page is reloaded. The question is to catch the moment when the user changes the settings of the browser. Then I would be able to send a command to the server not to use javascript using AJAX

3 Answers 3

3

You can't. JavaScript is required to detect events.

Follow the principles of Progressive Enhancement and Unobtrusive JavaScript instead.

Sign up to request clarification or add additional context in comments.

Comments

1

The best you can do is a noscript tag. Noscript tag is only displayed if there is no javascript. Beyond that you can't do much if the user has javascript disabled.

<noscript>JAvscript Disabled. Enable it or the world cannot function. </noscript>\

I am not sure if it is deprecated or something

Comments

0

Not sure what you mean, but to detect is not possible since javascript is disabled. I suggest you make the server wait for a javascript "command" (maybe you mean a ajax call/command ?) and if it doesn't arrive, then JS is off.

If you want to know good practice, check Quentin's links.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.