WordPress.org

Support

Support » Plugins and Hacks » WP Favorite Posts » [Resolved] Solution for Bug in IE Regarding Caching

[Resolved] Solution for Bug in IE Regarding Caching

  • To reproduce the bug, while logged out add a post to favorites, remove the post from favorites, and then add the same post to favorites again. It gives the success message the second time, but never actually adds it to favorites. This is because IE is caching the response, and the second time around it doesn’t actually hit the script.

    To fix, open up wpfp.js and replace this:

    jQuery.get(url, params, function(data) {
        dhis.parent().html(data);
        if(typeof wpfp_after_ajax == 'function') {
            wpfp_after_ajax( dhis ); // use this like a wp action.
        }
        loadingImg.hide();
    }

    With this:

    $.ajax({
        cache: false,
        url: url,
        data: params,
        success: function(data) {
            dhis.parent().html(data);
            if(typeof wpfp_after_ajax == 'function') {
                wpfp_after_ajax( dhis ); // use this like a wp action.
            }
            loadingImg.hide();
        },
    });

    Hope that helps someone.

    http://wordpress.org/plugins/wp-favorite-posts/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Solution for Bug in IE Regarding Caching’ is closed to new replies.
Skip to toolbar