There is a lot of advice how to use headers to prevent the browser from caching a file. I wish to do the opposite. The cache.php file below never changes. I've tested this using FF, Chrome, and FF, and each time index.html is reloaded, the cache.php is downloaded from the server. How do I tell the browser to cache the JavaScript file "cache.php"? Thank you
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<title>Testing</title>
<script src="cache.php" type="text/javascript"></script>
</head>
<body>
<p>Hello!</p>
</body>
</html>
cache.php
<?php
syslog(LOG_INFO,'cache.php'.rand());
header( 'Content-type: text/javascript' );
echo('alert("Hello!");');
?>