You cannot detect this server side, however you can present the client side of the message with the <noscript> , for example:
<noscript> <div class="alert">You need to enable JavaScript to use this site.</div> </noscript>
Tags
<noscript> appear when the client does not have a default JavaScript feature, so use them to present them with a message, element, etc., just give it some styles, and you're good to go.
Nick craver
source share