Preventing Form Caching With Javascript And jQuery

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title>Form Cache Issue</title>
 
	<!---
		Include the jQuery Javascript library. I am not sure
		why this makes a difference, but by including it, the
		Javascript below takes effect.
	--->
	<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
</head>
<body>
 
	<h1>
		Form Cache Issue
	</h1>
 
	<form id="form">
 
		<p>
			Name:<br />
			<input type="text" name="name" size="40" />
		</p>
 
		<p>
			Newsletter:<br />
 
			<input type="radio" name="newsletter" value="1"
				checked="true"
				/>
			Daily Digest<br />
 
			<input type="radio" name="newsletter" value="2" />
			Deals / Discounts Only<br />
		</p>
 
		<p>
			Preferred Contact Time:<br />
			<select name="contact_time">
				<option value="1" selected="true">Day Time</option>
				<option value="2">Night Time</option>
			</select>
		</p>
 
		<p>
			<input type="submit" value="Submit" />
		</p>
 
	</form>
 
 
	<!---
		Right after the form HTML has been rendered, set a timeout
		for the form reset. A slight timeout is needed for this
		code to work in Internet Explorer.
	--->
	<script type="text/javascript">
 
		setTimeout(
			function(){
				document.getElementById( "form" ).reset();
			},
			5
			);
 
	</script>
 
</body>
</html>

For Cut-and-Paste