Hi, I implemented a JavaScript code onto a .php file and made it my index on KevinSchaefer.net. The code is setup to redirect to a set of 3 URLs randomly, although it seems to favor one. I did 10 reloads, (Yes, going back to the index.php file
) and 6/10 times it directed to this.. Sometimes it favors this. Sorry if this sounds insane, its kind of annoying. Is there a way to make it purely random? Here is the code im using:
Any help appreciated.
Thanks, Kevin
Code:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
var pageArr = ["/home/1/index.html", "/home/2/index.html", "/home/3/index.html"];
document.location.href = pageArr[Math.ceil(Math.random()*pageArr.length)-1];
</script>
Any help appreciated.
Thanks, Kevin