Q:

How Can I mimic a meta refresh with JS?

I tried to do
<script type="text/javascript">
//<![CDATA[
document.write('<meta http-equiv="refresh" content="0;url=index.php" />');
//]]>
</script>
but that doesn't validate on strict =[
how can I do that with JS alone?

A:

How about:
location.href = 'index.php';

To refresh the same page:
location.reload();

To wait 2 seconds before reloading (as <meta> can do):
setTimeout(function(){ location.reload(); }, 2000);

