I am trying to find a solution to detect if clients brower has javascript enabled or not. Is there a way to check whether JavaScript is enabled in the client browser, in django if possible or in python?
2 Answers
The right approach is to degrade gracefully, but that is not always possible especially with web app. Use a <noscript> tag to tell the user to re-enable javascript.
If you need a solution through django, set a cookie using JS and try to read it in the second request. If you dont see the cookie then JS is not enabled. However, as a first request it can't be detected.