I would like to prevent all browser from caching the file script.php
I have the file script.php show a random number :
<?php
$response = "document.write('" . rand(0,999999) . "');"; // Show random number
header('Cache-Control: no-cache, no-store, must-revalidate');
header('Pragma: no-cache');
header('Expires: 0');
header('Content-Type', 'application/javascript');
echo $response;
and test.html :
<script src="script.php"></script>
<script src="script.php"></script>
<script src="script.php"></script>
When i open test.html page on Firefox, the file script.php is not cached and i get 3 differents random number. But on IE or Chrome, I got 3 times the same number that mean the browser cache has been used. Why Chrome and IE cache don't load 3 time the file? How to prevent that?