[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] OT: XMLHTTP + IE FOUND IT!!
- Subject: [ale] OT: XMLHTTP + IE FOUND IT!!
- From: jloden at toughguy.net (Jay Loden)
- Date: Fri, 15 Dec 2006 21:04:00 -0500
- In-reply-to: <1166199028.9068.19.camel@cfowler-laptop>
- References: <[email protected]> <[email protected]> <1166197560.9068.12.camel@cfowler-laptop> <1166199028.9068.19.camel@cfowler-laptop>
So IE was caching the page? Now that you mention it, the same thing happened to me when I
was testing some simple scripts. My production scripts with dynamic content pass the
following headers to IE for that reason:
http.header("Last-Modified: " + http.epoch2http(time.time() - 1200))
http.header("Cache-control: no-cache")
http.header("Pragma: no-cache")
http.header("Expires: -1")
http is a module of my own functions, and epoch2http takes a number of seconds since the
epoch and converts it to HTTP header format. The rest are headers recommended on MSDN to
force IE not to cache dynamic content (Firefox works correctly even without the extra
headers, as I'm sure you've surmised).
-Jay
cfowler wrote:
> req.open("GET", "/SC/Test/alarm_check.pl", false);
> req.setRequestHeader( "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00
> GMT" );
> req.send(null);
>
>
> I had to force IE to get the goods!
>
> This page lists known bugs or issues!
>
>
> http://en.wikipedia.org/wiki/XMLHttpRequest