If I do:
index.php
<?php
header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1.
header('Pragma: no-cache'); // HTTP 1.0.
header('Expires: 0'); // Proxies.
header("Location: http://apple.com",TRUE,307);
?>
Then replace index.php with new content that does NOT have a header redirect, is it possible that the browser caches the header redirect? I know this can happen with client side redirects, but I am not sure if it will happen with server side redirects. (IT doesn't appear to based on my testing, but I want to be sure.
EDIT:
It looks like I need to do a 307 redirect for it to NOT be cached by browser. See: http://www.php.net/manual/en/function.header.php#78470
I am also adding cache control headers to prevent caching just in case the 307 is cached by browser.
MY Goal is:
- Page should NOT be cached. When the header location redirect is removed it should NOT be redirected in any way.
Will the above code accomplish this. (My initial testing appears so)