You can try $.ajaxSetup ({ cache: false});

Cheers

On 17 Feb, 13:26, Hernando Gisinger <hgisin...@gmail.com> wrote:
> May be $.postJSON work too!!!
>
> 2009/2/17 IanW <ian.g.win...@googlemail.com>
>
>
>
> > Sorry all, I've fixed this now by just appending the time on the end
> > of the request to make it appear differerent to IE each time, this
> > seems to work!
>
> > On Feb 17, 11:49 am, IanW <ian.g.win...@googlemail.com> wrote:
> > > Hi,
> > > I've got an application developed in ASP.NET MVC using jQuery to
> > > handle JSON requests and responses.
>
> > > I use the following Javascript code to popup a dialog, send off the
> > > request and then move the client back to the page they were on
> > > previously:
>
> > > if (confirm("You currently have a project open, do you want to save it
> > > first?")) {
> > >         $.getJSON("/Projects/SaveAndCloseCurrentProject", null, null);
> > >         window.location = document.referrer;
> > >     }
> > >     else {
> > >         window.location = document.referrer;
> > >     }
>
> > > This code works absolutely fine in Firefox, and in fact, it works fine
> > > in IE7, at least the first time I use it. Unfortunately, when the code
> > > is called a second time in IE7, it never even sends the HTTP request.
> > > After a bit of experimenting I've found that if you clear the cache in
> > > IE7 it'll work again but you have to clear the cache each time to use
> > > it, which is of course useless. The code is executing because the
> > > window.location redirect still works and is performed okay it is
> > > simply the JSON request that is not.
>
> > > I'd rather not disable IE7's caching features as requiring the user to
> > > change web browser settings is of course not ideal.
>
> > > Does anyone have any idea why IE7 might cache this sort of thing and
> > > simply not send it again? I realise I send no parameters and receive
> > > no data with this request, but I have tried putting in some dummy data
> > > and code but unfortunately still suffer the same problem.
>
> > > Hope someone can help!
>
> > > Regards,
>
> > > Ian.

Reply via email to