Reputation: 18790
Hi I need to clear IE8 browser cache before loading my cd-based php application.
My php application is working inside a Dot net application. So before calling my php application I try to call one php page like this.
<?php
header("Pragma: no-cache");
header("Cache: no-cache");
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 01 Jan 2001 01:00:00 GMT");
?>
But its not clearing IE8 cache properly. How can I clear IE cache using php or jquery?
If any other option available please help me. Thanks in advance.
Upvotes: 1
Views: 2062
Reputation: 502
Please add this code to your php page
<?php
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>
Upvotes: 1