Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-30 Thread Chris Sansom
Right - time to deal with all these helpful answers I've been getting, but first, to save time, let me say... it's fixed! And a very simple fix it was too, which I /thought/ I'd already tried... On 29 Sep 2011, at 17:15, Richard Quadling wrote: Create a test case where it goes wrong. Write new

Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-30 Thread Richard Quadling
On 30 September 2011 10:27, Chris Sansom ch...@highway57.co.uk wrote: Right - time to deal with all these helpful answers I've been getting, but first, to save time, let me say... it's fixed! And a very simple fix it was too, which I /thought/ I'd already tried... On 29 Sep 2011, at 17:15,

Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-30 Thread Chris Sansom
On 30 Sep 2011, at 12:32, Richard Quadling wrote: onFailure / onSuccess is in response to a working result from the AJAX call. onComplete is in response to the AJAX mechanism shutting down. onComplete will always be called, but it isn't its job to deal with the data from the call. That is

Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-30 Thread Richard Quadling
On 30 September 2011 12:53, Chris Sansom ch...@highway57.co.uk wrote: On 30 Sep 2011, at 12:32, Richard Quadling wrote: onFailure / onSuccess is in response to a working result from the AJAX call. onComplete is in response to the AJAX mechanism shutting down. onComplete will always be

Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-30 Thread Phil Petree
I never meant to imply that onComplete did the same thing as onSuccess, what I meant to state was that onComplete ALWAYS gets called last. onSuccess can always set a flag and onComplete can do the UI updates right before turning off the spinner. This is useful if you're experiencing those

Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-30 Thread Richard Quadling
On 30 September 2011 13:09, Phil Petree phil.pet...@gmail.com wrote: I never meant to imply that onComplete did the same thing as onSuccess, what I meant to state was that onComplete ALWAYS gets called last.  onSuccess can always set a flag and onComplete can do the UI updates right before

Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-29 Thread Chris Sansom
On 29 Sep 2011, at 15:00, Chris Sansom wrote: I've tried various things to stop it caching, such as loading the top image via a tiny php script Forgot to mention, before anyone else does, that the first thing I tried, after Googling, was to put various query strings [such as '?' + (new

Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-29 Thread Richard Quadling
On 29 September 2011 15:00, Chris Sansom ch...@highway57.co.uk wrote: In sequence, this happens: -  User clicks image -  Ajax request is created, running a php script with various parameters, in which... -  ...the necessary renaming takes place (which involves checking for duplicates

Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-29 Thread Chris Sansom
On 29 Sep 2011, at 15:51, Richard Quadling wrote: Does ALL the JS work take place inside the onSuccess callback? The Back in JS bit has to be part of the onSuccess callback otherwise it will happen out of sequence. The A in AJAX is potentially the hiccough here. That's what I suspected but

Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-29 Thread Richard Quadling
On 29 September 2011 16:58, Chris Sansom ch...@highway57.co.uk wrote: On 29 Sep 2011, at 15:51, Richard Quadling wrote: Does ALL the JS work take place inside the onSuccess callback? The Back in JS bit has to be part of the onSuccess callback otherwise it will happen out of sequence. The A

Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-29 Thread Phil Petree
This is an interesting problem... my first reaction is that you'd want to use onComplete to update the div's instead of onSuccess. Test this with a couple of alerts and see which one gets called first and which is last (just as onCreate is the first call, onComplete is the last). To my way if

Re: [Proto-Scripty] Image cache problem with Ajax

2011-09-29 Thread Phil Petree
I didnt address the caching because I had to look to see if I could find where I had saved this link off the last time I had this problem... found it! The caching is probably on the browser side, not the server side. Setting the server side cache variables will only affect the page reload. The