I am trying to stop loading my php page if the javascript is not enabled on user's computer.
below method working fine. However please let me know is it cross browsered and is it safe?
<noscript>
<?php
echo "Please Enable JavaScript in your browser!";
exit;
?>
</noscript>
<div id="main">
<!-- #header -->
<div id="header">
<div id="logo"><a href="homepage.php" title="Go to Homepage"><span><?php echo $Name;?></span></a></div>.....
Please let me know anyother professional way I can do it.
PS: Some of my user tried to disable JavaScript after page load. This thing also affect some of my pages. I am getting wrong values on submit since the js disabled. I wanna overcome this situation please.
You can insert the tag
<title>Your title</title>
<noscript><meta http-equiv="refresh" content="0; URL=/badbrowser.html"></noscript>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With