IE and a couple of other browsers cache get requests...

If you want to fix it either use TJ's suggestion or use post and not get

Alex Mcauley
http://www.thevacancymarket.com
  ----- Original Message ----- 
  From: Brad Whitaker 
  To: [email protected] 
  Sent: Friday, November 06, 2009 11:02 PM
  Subject: [Proto-Scripty] Re: Ajax.Request not sending request to server in 
IE8, but processing continues with stale/cached response


  T.J.,

  Thank you very much for the response. The problem is reproducible in my 
development environment where I verified using Firebug that no Expires header 
is set on the Ajax response.

  I tried your "last resort" suggestion and the problem goes away. (I know it 
is a hack but I'm going to deploy it because I need a quick fix).

  I'll see if I can produce and submit a minimalist example that reproduces the 
problem.

  Thanks,

  Brad


  T.J. Crowder wrote: 
Hi Brad,

Can you produce a minimalist, self-contained example[1] demonstrating
the problem?  It sounds a bit like an IE8 issue, as I thought all XHR
requests were supposed to bypass local cache, but perhaps I'm wrong
about that.

Are you sure you're setting the cachability of the result correctly?
E.g., that it should not be cached?  (This would be in the headers of
the result.)  You might want to check your cache-control headers.

In the worst case (and this really should be a last resort), you
should be able to defeat caching by adding a query parameter that's
constantly changing, e.g.:

    new Ajax.Request(url + "?foo=" + (new Date().getTime()), ...);

[1] http://proto-scripty.wikidot.com/self-contained-test-page

HTH,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com


On Nov 3, 8:46 pm, Brad Whitaker <[email protected]> wrote:
  I'm having a problem with Ajax.Request in IE8 that I can't understand.
My code is working fine in other browsers. If I use the IE8 menu to
clear the browser cache to my domain then my next Ajax.Request() works
properly. But when Ajax.Request is invoked again this problem arises:
1) no request is actually sent to my server; 2) processing continues
normally but the content I see is from the previous request (in other
words, it is old content).

Any suggestions about how I might resolve this issue would be greatly
appreciated. onSuccess and onComplete are both being invoked even when
the server request is not issued. (In case additional details are
helpful: I'm invoking Ajax.Request() from within Prototype-UI
window.js setAjaxContent() function, and the content is used to fully
populate a modal window).

Thanks,

Brad
    

  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to