I want to send an ajax request using sortable from jquery-ui. When I re-sort a list, for some reason, the ajax call isn’t appending timestamp onto the querystring to avoid caching. Why won’t this code work?
$('#categorylist').sortable({
placeholder: "ui-state-highlight",
update:function(e, ui){
var categorylist = $('#categorylist').sortable('serialize', {attribute:'data-id'});
$.ajax({
url:'actions_category.php?action=rank',
method:'post',
data:categorylist,
cache:false
});
}
});
It will only append the time stamp for GET and HEAD requests. It should not be needed for other types of requests except in IE8 for POST requests where you have already issued a GET request against the URL.
http://api.jquery.com/jQuery.ajax/