here is the code i have written
index.php:
Thanks guys for helping me out but i found a way that force the browser to prevent cache and i have used the below code :
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0 "); // Proxies.
here is the reference : Making sure a web page is not cached, across all browsers and its working pretty good.