I am using JQuery to load some data dynamically via ajax. Whenever the user initiates the ajax request (i.e. clicks a button, or loads a page etc.), I display an ajax loader gif. Once the ajax requests completes (or errors out) I hide the loader image.
This works great most of the time. But I noticed (in IE7 for instance) that ajax calls that get sent out on page load get cached (I think). So basically when I refresh the page and the ajax call is presumably fired out, IE will load up the cached data instead. As a result, the success (or error) callback in the jquery .ajax()
function never gets called and the loader image stays on indefinitely. Whats the best way around this?