2007 Mar 29

IE7 always keep a cache of the visited pages

The new version Internet Explorer 7 has a problem in caching of the displayed specially if you are using some ajax applications. Even if you have use the meta tags that specifies no cache, the IE7 would ignore them.

<meta name="pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="cache-control" content="no-cache">

The above code does not work on IE7. You could force the browser to remove the cache by manually deleting it or by using the following code below in PHP:

// choose a date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// set the last modified date to today
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// if the browser supports HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// if the browser supports HTTP/1.0
header("Pragma: no-cache");

Another way is to add the meta tag code below in between your end body tag and your end html tags. It does not conform to the w3c standards, but it works. :D

</body>
<head>
<meta http-equiv="PRAGMA" content="NO-CACHE" />
</head>
</html>

0 TrackBacks

Listed below are links to blogs that reference this entry: IE7 always keep a cache of the visited pages.

TrackBack URL for this entry: http://www.tildemark.com/cgi-bin/mt4/mt-tb.cgi/71

2 Comments

HOW do you manually remove or edit out entries in the CACHE in IE7?

I find no file titled CACHE. Any idea where I would find it?

Many thanks!

@Esteban Internet Explorer cache are hidden. you won't be able to find them in normal folder browsing but its there. Just in case you did not know, i use cache interchangeably with Temporary Internet Files folder. In Windows XP its located at

C:\Documents and Settings\[[USER FOLDER]]\Local Settings\Temporary Internet Files

Leave a comment

About this Entry

This page contains a single entry by tildemark published on March 29, 2007 12:50 PM.

Mobile Phone Tracking System was the previous entry in this blog.

Blocking unwanted referrers is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Recent Activity

Today

  • tildemark tweeted, "@jjdoblados SmartBro wont work with linux because the installer is an exe file. plus SMARTBRO sucks my dialup connection is even faster."
  • tildemark tweeted, "i think i accidentally drank 2 dosage of my medication. now, im feeling dizzy. is there a way i cound unswallow it?"

Monday

  • tildemark tweeted, "I'm feeling tired. i hope the clock will run a bit faster this time."
  • tildemark tweeted, "got sick for about 3 days. ended up finishing nwn2."

Thursday

  • tildemark tweeted, "im planning to move again, but i dont know where."

Sunday

  • tildemark tweeted, "I drank 3 sachets of instant coffee, ang now i cant sleep even if my eyes are sleepy? I can hear voices.wtf"

Friday

  • tildemark tweeted, "im so sleepy. Zzzzzzzz"

Sunday

  • tildemark tweeted, "some of my scipts are not working with godaddy. but works fine on the others. not mention their poorly coded admin page"

Thursday

  • tildemark tweeted, "so many pending tasks i need to finish. need more coffee !!!"
  • tildemark tweeted, "@gmtristan i dont think that is true."