We have a JS script that might change over each request. We do not have the opportunity to change the src of the script tag. However, we do have availability to change the serverside script that outputs the JS.
Why isn't this script being reloaded on iOS after you press the back button?
In php we sent out these headers:
header("Cache-Control: private, no-cache, no-store, must-revalidate, max-age=0"); // HTTP 1.1.
header('Last-Modified: '.gmdate('D, d M Y H:i:s \G\M\T', time()));
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time()));
header('Access-Control-Allow-Origin: *');
header('Pragma: no-cache'); // HTTP 1.0.
header('Content-Type: application/javascript; charset=utf-8');//lets pretend it to be a JS file
What is missing to force an reload of the js file?
UPDATE:
Page 1 is loaded with script tag
After an anchor click on page 1 customer is redirect to new page; page 2. script src="some.js etc etc. some.js is dynamically generated on the server and DOES output something.
Hitting the back button, will lead to page 1. But the some.js is showing the content of page 2. Strange????