Re: AJAX html won't refresh after data update
- From: timsamshuijzen@xxxxxxxxx
- Date: Sat, 06 Oct 2007 16:53:30 -0700
On Oct 6, 4:32 am, Randy Webb <HikksNotAtH...@xxxxxxx> wrote:
Thomas 'PointedEars' Lahn said the following on 10/5/2007 7:41 PM:
Randy Webb wrote:
Thomas 'PointedEars' Lahn said the following on 10/5/2007 2:00 PM:
c...@xxxxxxxxxxxx wrote:
On Oct 4, 9:52 am, Robin <a...@xxxxxxxxxxxxx> wrote:
Add a 'unique' variable to the query string of you ajax URI so thatDang, Robin! That actually works! Not used to getting such good help
browser doesn't use the cached copy.
i.e.
obj.open('GET','ajax_call.php?recid='+recid+'&z='+
new Date().getTime(),true);
the first time around :D
Pure nonsense.Thanks for the great idea.That idea is BAD because it fills the browser cache with garbage, and so
eventually slows down access to other content. Unnecessarily.
(sic!)
It isn't nonsense, it's a fact. (Or have I overlooked your argument by any
chance?)
You have overlooked the argument. There is a very good reason for using
a query string to force a reload from the server. And no, headers and
server settings won't satisfy the need.
I have followed this post with interest as I have experienced some
strange exceptions to the "IE caches the results of HTTP GET requests"-
rule. I have not found a concise pattern in my findings yet, but I can
conclude that IE's internal caching-strategy "agent" is more complex
than can be listed in a small set of rules. I think that IE has a
large set of rules (including some state-dependencies) for determining
whether to fetch data from cache or to do a reload. In my current
simple test-environment I can reproduce the fact that the "Cache-
Control" and/or "Expires" headers definately have an effect on whether
data is fetched from cache or from a reload (in IE, that is).
Furthermore, IE's caching strategy seems to be dependant on the
requested document's extension, but I am not completely sure of this
statement yet. In any case, with my PHP (-extension) scripts, the
"Cache-Control" and "Expires" headers definately make a difference. On
the other hand, one could argue that setting the headers will not be a
good general solution in forcing reloads, because one also has to take
"forwards compatibility" into account. MS clearly states that the
"POST" method will "guarantee" a page reload, which simply translates
into a meaning that they reserve the right to change their GET-
oriented cache strategy in future versions of IE. I (regret to say
that I) agree with PointedEars that setting a unique variable to the
query string is a bad solution for forcing page reloads. But I am also
saying that I do not know a better alternative solution. If anyone is
still interested in this subject, just let me know and I will post the
code I used during testing.
.
- Follow-Ups:
- Re: AJAX html won't refresh after data update
- From: Thomas 'PointedEars' Lahn
- Re: AJAX html won't refresh after data update
- References:
- AJAX html won't refresh after data update
- From: javelin
- Re: AJAX html won't refresh after data update
- From: Robin
- Re: AJAX html won't refresh after data update
- From: cts1
- Re: AJAX html won't refresh after data update
- From: Thomas 'PointedEars' Lahn
- Re: AJAX html won't refresh after data update
- From: Randy Webb
- Re: AJAX html won't refresh after data update
- From: Thomas 'PointedEars' Lahn
- Re: AJAX html won't refresh after data update
- From: Randy Webb
- AJAX html won't refresh after data update
- Prev by Date: Re: how to find all elements starting with <text>
- Next by Date: Re: AJAX html won't refresh after data update
- Previous by thread: Re: AJAX html won't refresh after data update
- Next by thread: Re: AJAX html won't refresh after data update
- Index(es):
Relevant Pages
|