jQuery.ajax is hitting the url of a previous call, no matter which url I pass to it

The following call should try to hit “/getSomething”. However, it’s hitting “/previousSomething”, a url fetched previously via jQuery.ajax. I see the request to the old url go out, however neither the “success” nor the “failure” function is getting called.

jQuery.ajax("/getSomething", {
  success: function(cartData){
    alert("success")
    movieCart = cartData;
    callback(cartData);
  },
  failure: function(){
    alert("failure");
  }
});

This code is running on a nasty corporate site which loads of scripts written by who-knows, multiple versions of jquery imported, etc. I suspect this is a problem called by the generally messy ecosystem my code is running in. Anybody have ideas about specifically what might be going on, or how to fix or even troubleshoot it?

newest questions tagged jquery – Stack Overflow

About Admin