samedi 1 août 2015

prevent caching of xmlhttp request

I have a javascript that retrieves a JSON through an ajax request. My problem is that the browser starts caching the response to this request, so I don't actually get the latest data from the server, but instead an older cached version.

    $.getJSON( self.data('pathAllGet'), function( json ) {
        self.data('galleryData',json);
        self.data(render(self));
    });

Aucun commentaire:

Enregistrer un commentaire