Disable AJAX Caching

I use this javascript function ( which in turn uses jquery.ajax function ) the cache: false would do the trick. This works perfectly for me , may be you can give it a try

    function ajax_call(urlString)
    {
        ret_val="";
        $.ajax
        (
            {
                type: "GET",
                url: urlString,
                async:false,
                cache:false,
                dataType: 'html',
                success: function(msg)
                {
                    ret_val=msg;
                },
                error:function (xhr, textStatus, thrownError)
                {
                    ret_val=xhr.readyState;
                    alert("status=" +xhr.status);
                }
            }
        );
        return ret_val;
    } 

You can send random parameters using POST, while sending the important vars using GET if you need to.

If you have problems with IE, I know that sending something with POST makes it to stop caching server responses

Tags:

Ajax