Im looking for a script that can refresh to a predefined list of URLs and each url has its own “weight”.
What I am trying to accomplish is this, a marketing campaign is going to be sending mass amounts of traffic. What I want is kind of load balancing between 2 URLS, so if when someone visits a URL, 10% of the time it will refresh to a similar URL.
I found
[CODE]<script type=”text/javascript”>
<!–
Array.prototype.random = function () {return this[Math.floor(Math.random() * this.length)]}
Date.ONE_SECOND = 1000;
url = [‘fee.html’, ‘fie.html’, ‘foe.html’, ‘fum.html’]
setTimeout(‘location = url.random()’, 5 * Date.ONE_SECOND)
// –>
</script>
But it’s not quite what I had in mind