Hello - My ajax call appears to be getting cached, specifically the InitRowsPerPage function in the code below:
$(function () {
$('#ddlRowCount').change(function () {
SetRowsPerPage(this.value);
});
InitRowsPerPage();
});
function InitRowsPerPage() {
$.ajax({
url: '/Home/GetRowsPerPage',
success: function (count) {
$('#aSessionRowCount').html(count);
}
});
}
function SetRowsPerPage(count) {
$.ajax({
url: '/Home/SetRowsPerPage/', data: { count: count }
});
}
In the code above, InitRowsPerPage gets called on initial browser load as expected.
However, on subsequent browser loads, my breakpoints show that execution goes straight to the success handler in the function and the action method in the controller does not get called.
This appears to reflect some type of caching behavior.
Can you explain why this would happen and how I can force the url to get executed every time?