Skip to content
Advertisement

Check if JavaScript is enabled with PHP

Is there a way to check if JavaScript is enabled with PHP? If so, how?

Advertisement

Answer

No, that is not possible, because PHP is a server side language, it does not access the client’s browser in any way or form (the client requests from the PHP server).

The client may provide some meta info through HTTP headers, but they don’t necessarily tell you whether the user has JavaScript enabled or not and you can’t rely on them anyway,

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement