0

On web page, I want to check whether the user has no script available.

Just after the check, I want to write something on php code (like put some log in db).

I have checked on some sites, such as: PHP & <noscript> combination to detect enabled JavaScript in browser

and Check whether Javascript is enabled but the problem is, that the server side will have $_COOKIE or $_SESSION set as wanted (for the check) only after the page is reloaded again.

I want to check on php, that the client doesn't support javascript, just on first clicking the page (no need clicking it twice).

How can I do that?

Thanks :)

1 Answer 1

3

In the noscript section you could load a resource from your server. If the a visitor loads the resource, you know that he has JavaScript disabled.

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

1 Comment

OK, thank you. I see that the php run after the whole html had been loaded (not while loading), but since I know that fact, I can check later the consequences (such as writing to db) only after the loading of the page - that's OK with me. Thanks anyway

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.