Circumvent cache with random number parameter

So i’ve found somewhere a clue to bypassing the caching of an applet: add a random number parameter, somewhere.
but i’m not very clear yet exactly how to do this: generate a random number with javascript and then what? - where do i put it, how do i pass it?
I’m trying to cobble something together but am really bad in html, would appreciate a clue as to what i’m doing:


<html>
<head>
<title>UDP Multiplayer Test</title>
</head>
<body>

<script language=JavaScript>
<!--
var rand_no = Math.floor(Math.random()* 10000;
-->
</script>
<applet code="gameapplet.SimpleGameApplet.class" 
        codebase="jars/"
        archive="udpclient.jar"
        width=100% height=100%>
	<param name=host value="karmington.game-server.cc">
Your browser is completely ignoring the <applet> tag!
</applet>
</body></html>

You would pass it in the archive attribute, since that is the resource being downloaded from the server.

This should work:


<html>
<head>
<title>UDP Multiplayer Test</title>
</head>
<body>

<script language=JavaScript>
var rand_no = Math.floor(Math.random()* 10000);
var applet = '<applet code="gameapplet.SimpleGameApplet.class" ' +
             'codebase="jars/" ' +
             'archive="udpclient.jar?r=' + rand_no + '" ' +
             'width=100% height=100%>' +
             '<param name=host value="karmington.game-server.cc"></param>' +
             'Your browser is completely ignoring the <applet> tag!' +
             '</applet>'

document.write(applet);
</script>
</body></html>

Thank you!

Might want to escape the reference to “the tag” in the fallback text.