0

I need to check from server side if client machine is Javascript enabled or not.
Is it possible in PHP? If it is, how?

4
  • 1
    Ajax call to the server on page load. If the call happens, javascript is enabled. Commented Dec 16, 2014 at 7:18
  • 1
    It's possible using AJAX as arao wrote, I have another question. Why you need to know that on server? I mean you what to solve something what should be solved better without this knowledge. Commented Dec 16, 2014 at 7:19
  • You can use this solution Commented Dec 16, 2014 at 7:20
  • 1
    Why in earth do you want to do this with PHP ? Use javascript itself, or even HTML noscript tag Commented Dec 16, 2014 at 7:21

1 Answer 1

0

Try using ajax from client, if it works then javascript is enabled

With jQuery you can simply:

$.ajax({
    url: "/checkjavascript.php"
});

if your php receives call from client then Javascript is enabled in the client

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.