Jquery not working in IE



Hi,

I have the following function in Jquery. The function will check if there are any new posts to the message board, and if so, will load them. For some reason, new data never loads in IE 7, but loads fine in FF and Chrome. Moreover, when I refresh the page, the data doesn't come in either - only when the cache is cleared.

 function update(){
    $.get("getlatest.php", {
        id: $.cookie('last_post_id')
    }, function(response){
 
 
        $('#board_posts').prepend(response);
        $('.incoming_post').slideDown("slow").effect("highlight", {}, 3000);
        $('.incoming_post').toggleClass("incoming_post").addClass("old_post");
 
    }, "html");
}



Internet Explorer caches requests. See the cache flag for jQuery Ajax requests. It will add a random query string parameter to the URL (based on the current time) to make it unique and uncacheable. You can do this yourself as well if you like: 'request.php?_=' + (+new Date())

The solution: http://eisabainyo.net/weblog/2010/04/21/troubleshooting-jquery-get-cache-issue-in-internet-explorer/