nevynev Posted August 9, 2007 Share Posted August 9, 2007 Hi there, I know I should code a side to allow non javascript users to be able to use a site but Im in a rush to build a site. Could someone write me a bit of code which will test to see if a user has javascript off and if so redirects the to e.g. howtoturnonjavascript.php ? Incedentally - what percentage of users accessing a social networking site are likely to have Javascript turned off? Thanks NevyNev Quote Link to comment Share on other sites More sharing options...
php_tom Posted August 10, 2007 Share Posted August 10, 2007 Actually, you can test for JavaScript in the browser (not server-side) <html> <body> <script type='text/javascript'> window.location.href='javascriptEnabled.html'; </script> <noscript> <meta HTTP-EQUIV="REFRESH" content="0; url=javascriptNotEnabled.html"> </noscript> </body> </html> http://www.w3schools.com/browsers/browsers_stats.asp (w3schools) reports that in January, 94% of visitors to their site had JavaScript enabled. That figure might be a bit off, since it's a web developers' website, but I figure its close... maybe 90% of typical web users have JS. Hope that helps. Quote Link to comment 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.