我有一个由PHP、JavaScript和许多Jax调用组成的应用程序。 在Firefox中,我的应用程序一直在工作。 但是,当我在Internet Explorer-8或类似版本中运行它时,我的AJAX调用会被缓存在浏览器中,因此我无法通过AJAX调用输出最新信息,而是提供了浏览器缓存中存储的旧数据的结果。
I have tried lots of possible options as listed below
1.) I added following meta tag in header files
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
2.) 我添加了以下 PHP 代码
header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header('Pragma: no-cache');
但是以上两种方法都没有解决我的问题,即请问有人可以帮我在应用程序运行时禁用Internet Explorer的缓存,以便获取最新的信息。
提前致谢。