clanstyles Posted January 11, 2008 Share Posted January 11, 2008 How can I check if javascript is enabled then redirect a user? The only way I know of is doing: <noscript> <meta http-equiv="refresh" content="0;url=http://google.com"> </noscript> Quote Link to comment https://forums.phpfreaks.com/topic/85569-checking-javascript-enabled/ Share on other sites More sharing options...
wildteen88 Posted January 11, 2008 Share Posted January 11, 2008 Using noscript tag is the only way I believe. Quote Link to comment https://forums.phpfreaks.com/topic/85569-checking-javascript-enabled/#findComment-436674 Share on other sites More sharing options...
clanstyles Posted January 11, 2008 Author Share Posted January 11, 2008 Well my probme is that is not xhtml valid. I want to create my site valid and heh thats wont let me because i guess meta tags hate beging childs or w/e in nods. Quote Link to comment https://forums.phpfreaks.com/topic/85569-checking-javascript-enabled/#findComment-436676 Share on other sites More sharing options...
phpQuestioner Posted January 12, 2008 Share Posted January 12, 2008 try this; it may or may not validate, but it is worth a try: <script type="text/javascript"> <![CDATA[ // content of your Javascript goes here ]]> </script> <noscript> <![CDATA[ <meta http-equiv="refresh" content="0;url=http://google.com"> ]]> </noscript> Quote Link to comment https://forums.phpfreaks.com/topic/85569-checking-javascript-enabled/#findComment-437060 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.