Michael Fesser <ne*****@gmx.net> wrote in message news:<26********************************@4ax.com>. ..
.oO(R. Rajesh Jeba Anbiah)
<noscript>
<meta http-equiv="refresh" content="0,URL='foo.php?js=0'" />
</noscript>
While this might work, it's no valid HTML (noscript is not allowed in
the document's head).
Yes, this a good criticism:-) What about this one, which doesn't
rely on meta refresh as browsers could disable it.
<?php
//foo.php
$js = (isset($_GET['js']) && $_GET['js']=='1') ? 1 : 0;
if (!$js)
{
?>
<script>
window.location = "foo.php?js=1";
</script>
<?php
}
echo $js;
//etc etc
?>
Also, if form is allowed to check the JS, it will be much easier
as we can populate any variables on onSubmit event. Also, it could be
much easier to do that in web bug.
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog:
http://rajeshanbiah.blogspot.com/