Ajax.Updater Issue in IE - cache issue - Symfony + Prototype

61 views
Skip to first unread message

Avichal Garg

unread,
Oct 28, 2009, 3:54:44 AM10/28/09
to Prototype & script.aculo.us
Hi,

I'm using Prototype 1.6.0.3. I spent a lot of time searching the net
for solutions to this and found a few good suggestions/hints. The most
relevant is the following, which talks about the exact problem I'm
having: https://prototype.lighthouseapp.com/projects/8886/tickets/175-ajax-updater-not-working-correctly-under-ie-opera

I have a page, sitting at www.domain.com/folder which opens a popup.
This popup then uses Ajax.Updater to update a div on www.domain.com/folder
(the parent/opening page). In FF this works fine. In IE it works the
first time but not subsequent times. After the parent page is
refreshed.

I've tried setting the http headers in the indexSuccess module/actions/
actions.class.php as suggested here http://greenash.net.au/posts/thoughts/an-ie-ajax-gotcha-page-caching

$this->getResponse()->setHttpHeader('Last-Modified', gmdate("D, d M Y
H:i:s")." GMT");
$this->getResponse()->setHttpHeader('Cache-Control', 'no-store, no-
cache, must-revalidate, post-check=0, pre-check=0');
$this->getResponse()->setHttpHeader('Pragma', 'no-cache');

This hasn't worked.

I also noticed in the updateContent function in Ajax.Updater, there is
a call: receiver.update(responseText); (line 1468 or so)

The first time through, this call is executed and the resulting call
is made to the IE specific update function on line 2449. The second
time through, this function doesn't seem to get called at all.

I also tried creating a unique URL for the ajax request by appending
the current timestamp to the end of www.domain.com/folder?timestamp=12311312312.
This creates two unique subsequent URLs for the Ajax.Updater call but
the call to receiver.update still seems to fail.

Does anyone have ideas on what is going on? Am I not setting my http
headers in the right place?

Thanks,
Avichal

david

unread,
Oct 30, 2009, 4:50:50 AM10/30/09
to Prototype & script.aculo.us
Hi Avichal Garg,

Is it a GET or a POST request, because IE (and OPERA) cache GET
request.
In Firebug, do you see the header you set when request is lauch from
FF ?

--
david

On 28 oct, 08:54, Avichal Garg <avic...@gmail.com> wrote:
> Hi,
>
> I'm using Prototype 1.6.0.3. I spent a lot of time searching the net
> for solutions to this and found a few good suggestions/hints. The most
> relevant is the following, which talks about the exact problem I'm
> having:https://prototype.lighthouseapp.com/projects/8886/tickets/175-ajax-up...
>
> I have a page, sitting atwww.domain.com/folderwhich opens a popup.
> This popup then uses Ajax.Updater to update a div onwww.domain.com/folder
> (the parent/opening page). In FF this works fine. In IE it works the
> first time but not subsequent times. After the parent page is
> refreshed.
>
> I've tried setting the http headers in the indexSuccess module/actions/
> actions.class.php as suggested herehttp://greenash.net.au/posts/thoughts/an-ie-ajax-gotcha-page-caching

Avichal Garg

unread,
Nov 23, 2009, 8:00:13 PM11/23/09
to Prototype & script.aculo.us
Hi David,

It's a Get request. Appending the timestamp at the end of the URL was
supposed to fix that but it didn't seem to do that...

Avichal

On Oct 30, 12:50 am, david <david.brill...@gmail.com> wrote:
> Hi Avichal Garg,
>
> Is it a GET or a POST request, because IE (and OPERA) cache GET
> request.
> In Firebug, do you see the header you set when request is lauch from
> FF ?
>
> --
> david
>
> On 28 oct, 08:54, Avichal Garg <avic...@gmail.com> wrote:
>
> > Hi,
>
> > I'm using Prototype 1.6.0.3. I spent a lot of time searching the net
> > for solutions to this and found a few good suggestions/hints. The most
> > relevant is the following, which talks about the exact problem I'm
> > having:https://prototype.lighthouseapp.com/projects/8886/tickets/175-ajax-up...
>
> > I have a page, sitting atwww.domain.com/folderwhichopens a popup.

david

unread,
Nov 24, 2009, 2:35:20 AM11/24/09
to Prototype & script.aculo.us
Hi Avichal,
do you have a live exemple?
because it's hard to find the problem with just explanation.

--
david

On 24 nov, 02:00, Avichal Garg <avic...@gmail.com> wrote:
> Hi David,
>
> It's a Get request. Appending the timestamp at the end of the URL was
> supposed to fix that but it didn't seem to do that...
>
> Avichal
>
> On Oct 30, 12:50 am, david <david.brill...@gmail.com> wrote:
>
> > Hi Avichal Garg,
>
> > Is it a GET or a POST request, because IE (and OPERA) cache GET
> > request.
> > In Firebug, do you see the header you set when request is lauch from
> > FF ?
>
> > --
> > david
>
> > On 28 oct, 08:54, Avichal Garg <avic...@gmail.com> wrote:
>
> > > Hi,
>
> > > I'm using Prototype 1.6.0.3. I spent a lot of time searching the net
> > > for solutions to this and found a few good suggestions/hints. The most
> > > relevant is the following, which talks about the exact problem I'm
> > > having:https://prototype.lighthouseapp.com/projects/8886/tickets/175-ajax-up...
>
> > > I have a page, sitting atwww.domain.com/folderwhichopensa popup.
Reply all
Reply to author
Forward
0 new messages