Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > AJAX html won't refresh after data update

Reply
Thread Tools

AJAX html won't refresh after data update

 
 
javelin
Guest
Posts: n/a
 
      10-04-2007
I created a feature in a page where a DIV displays child records of
the current record. From this same page, I can submit the insertion of
a new child record. However, the while the previous child records
displayed fine, the newly added ones don't - until I close down IE and
restart it. I know, there's a setting in IE options which will force a
refresh on each page load, instead of caching, but I can't access it
from these computers (NT policy prohibits it, I guess). None of the
end users can either, so that's not a solution. Anything I can do
programmatically here?

Thanks.

 
Reply With Quote
 
 
 
 
Robin
Guest
Posts: n/a
 
      10-04-2007
javelin wrote:
> I created a feature in a page where a DIV displays child records of
> the current record. From this same page, I can submit the insertion of
> a new child record. However, the while the previous child records
> displayed fine, the newly added ones don't - until I close down IE and
> restart it. I know, there's a setting in IE options which will force a
> refresh on each page load, instead of caching, but I can't access it
> from these computers (NT policy prohibits it, I guess). None of the
> end users can either, so that's not a solution. Anything I can do
> programmatically here?


Add a 'unique' variable to the query string of you ajax URI so that
browser doesn't use the cached copy.

i.e.
obj.open('GET','ajax_call.php?recid='+recid+'&z='+
new Date().getTime(),true);


HTH
Robin
 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      10-04-2007
javelin wrote:
> Subject: AJAX html won't refresh after data update


http://www.mnot.net/cache_docs/


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
 
Reply With Quote
 
cts1@spvision.com
Guest
Posts: n/a
 
      10-05-2007
Dang, Robin! That actually works! Not used to getting such good help
the first time around

Thanks for the great idea.

J

On Oct 4, 9:52 am, Robin <(E-Mail Removed)> wrote:
> javelin wrote:
> > I created a feature in a page where a DIV displays child records of
> > the current record. From this same page, I can submit the insertion of
> > a new child record. However, the while the previous child records
> > displayed fine, the newly added ones don't - until I close down IE and
> > restart it. I know, there's a setting in IE options which will force a
> >refreshon each page load, instead of caching, but I can't access it
> > from these computers (NT policy prohibits it, I guess). None of the
> > end users can either, so that's not a solution. Anything I can do
> > programmatically here?

>
> Add a 'unique' variable to the query string of you ajax URI so that
> browser doesn't use the cached copy.
>
> i.e.
> obj.open('GET','ajax_call.php?recid='+recid+'&z='+
> new Date().getTime(),true);
>
> HTH
> Robin



 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      10-05-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> On Oct 4, 9:52 am, Robin <(E-Mail Removed)> wrote:
>> Add a 'unique' variable to the query string of you ajax URI so that
>> browser doesn't use the cached copy.
>>
>> i.e.
>> obj.open('GET','ajax_call.php?recid='+recid+'&z='+
>> new Date().getTime(),true);

>
> Dang, Robin! That actually works! Not used to getting such good help
> the first time around
>
> 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.

Please don't top-post: http://jibbering.com/faq/


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
 
Reply With Quote
 
cts1@spvision.com
Guest
Posts: n/a
 
      10-05-2007
Dang, Robin! That actually works! Not used to getting such good help
the first time around

Thanks for the great idea.

J

On Oct 4, 9:52 am, Robin <(E-Mail Removed)> wrote:
> javelin wrote:
> > I created a feature in a page where a DIV displays child records of
> > the current record. From this same page, I can submit the insertion of
> > a new child record. However, the while the previous child records
> > displayed fine, the newly added ones don't - until I close down IE and
> > restart it. I know, there's a setting in IE options which will force a
> >refreshon each page load, instead of caching, but I can't access it
> > from these computers (NT policy prohibits it, I guess). None of the
> > end users can either, so that's not a solution. Anything I can do
> > programmatically here?

>
> Add a 'unique' variable to the query string of you ajax URI so that
> browser doesn't use the cached copy.
>
> i.e.
> obj.open('GET','ajax_call.php?recid='+recid+'&z='+
> new Date().getTime(),true);
>
> HTH
> Robin



 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      10-05-2007
Randy Webb wrote:
> Thomas 'PointedEars' Lahn said the following on 10/5/2007 2:00 PM:
>> (E-Mail Removed) wrote:
>>> On Oct 4, 9:52 am, Robin <(E-Mail Removed)> wrote:
>>>> Add a 'unique' variable to the query string of you ajax URI so that
>>>> browser doesn't use the cached copy.
>>>>
>>>> i.e.
>>>> obj.open('GET','ajax_call.php?recid='+recid+'&z='+
>>>> new Date().getTime(),true);
>>> Dang, Robin! That actually works! Not used to getting such good help
>>> the first time around
>>>
>>> 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.

>
> Pure nonsense.


(sic!)

It isn't nonsense, it's a fact. (Or have I overlooked your argument by any
chance?)


PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
 
Reply With Quote
 
Laurent vilday
Guest
Posts: n/a
 
      10-06-2007
Thomas 'PointedEars' Lahn a écrit :
> Randy Webb wrote:
>> Thomas 'PointedEars' Lahn said the following on 10/5/2007 2:00 PM:
>>> (E-Mail Removed) wrote:
>>>> On Oct 4, 9:52 am, Robin <(E-Mail Removed)> wrote:
>>>>> Add a 'unique' variable to the query string of you ajax URI so that
>>>>> browser doesn't use the cached copy.
>>>> Dang, Robin! That actually works! Not used to getting such good help
>>>> the first time around
>>>> 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.

>> Pure nonsense.

> (sic!)
>
> It isn't nonsense, it's a fact.


sic !

It is well-known among competent Web developers that IE is suffering a
cache issue with XHR when the call method is "GET". And no headers will
do anything to it.

The only solution is to add a dummy unique variable to the querysting.

*That* is a fact among others !

--
laurent
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      10-06-2007
Randy Webb 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:
>>>> (E-Mail Removed) wrote:
>>>>> On Oct 4, 9:52 am, Robin <(E-Mail Removed)> wrote:
>>>>>> Add a 'unique' variable to the query string of you ajax URI so
>>>>>> that browser doesn't use the cached copy.
>>>>>>
>>>>>> i.e. obj.open('GET','ajax_call.php?recid='+recid+'&z='+ new
>>>>>> Date().getTime(),true);
>>>>> Dang, Robin! That actually works! Not used to getting such good
>>>>> help the first time around
>>>>>
>>>>> 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.
>>> Pure nonsense.

>> (sic!)
>>
>> It isn't nonsense, it's a fact. (Or have I overlooked your argument by
>> any chance?)

>
> You have overlooked the argument.


There was no argument. There was a statement.

> 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.


You have not stated the reason; that is no argument, it is a statement.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$(E-Mail Removed)>
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      10-06-2007
Laurent vilday wrote:
> Thomas 'PointedEars' Lahn a écrit :
>> Randy Webb wrote:
>>> Thomas 'PointedEars' Lahn said the following on 10/5/2007 2:00 PM:
>>>> (E-Mail Removed) wrote:
>>>>> On Oct 4, 9:52 am, Robin <(E-Mail Removed)> wrote:
>>>>>> Add a 'unique' variable to the query string of you ajax URI so that
>>>>>> browser doesn't use the cached copy.
>>>>> Dang, Robin! That actually works! Not used to getting such good help
>>>>> the first time around
>>>>> 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.
>>> Pure nonsense.

>> (sic!)
>>
>> It isn't nonsense, it's a fact.

>
> sic !
>
> It is well-known among competent Web developers that IE is suffering a
> cache issue with XHR when the call method is "GET". And no headers will
> do anything to it.


Where is your proof for that?

> The only solution is to add a dummy unique variable to the querysting.


Non sequitur.

> *That* is a fact among others !


You have to prove that.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$(E-Mail Removed)>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX Asyncfileupload - how to refresh updatepanel after UploadedComplete Mel ASP .Net 1 01-18-2012 05:20 PM
AJAX UpdatePanel does not refresh after calling Update()-Method Michael Schöller ASP .Net 1 11-23-2009 03:33 PM
refresh dropdownlist after formview update Jon Paal ASP .Net 0 02-09-2007 04:52 PM
AJAX IDE and AJAX TOOL--The Release of JoyiStar AJAX WebShop 3 Beta minnie Java 1 12-13-2006 06:29 AM
ajax image data fetch, javascript IMG data update? Marcus Javascript 2 12-08-2006 04:51 PM



Advertisments