Open philgyford opened 7 years ago
Ah, it seems to be the jQuery $.get()
request caching the response in the browser.
In el-pagination.js
, if I replaced line 65 with an $.ajax()
request with cache: false
, it works as expected. I replaced this:
$.get(context.url, data, function(fragment) {
// ...
});
with:
$.ajax({
url: context.url,
data: data,
cache: false,
success: function(fragment) {
// ...
}
});
Is this expected behaviour? Is there an easy way to disable it?
I'm having problems getting Twitter-style pagination working - it seems to load old versions of 'pages' after the first one.
The initial page load is fine, but when I click 'show more' the subsequent 'pages' use old versions of the template/HTML, and old versions of the items-per-page number. If I click far enough, and get to a 'page' I haven't visited before, then I get the correct, current template and items-per-page number. It's as if everything is cached somewhere, although I don't currently have any caching set up.
I'm using the local Django 1.10 development server. If I visit a page directly - i.e., go to
/exhibitions/?page=2
in the browser - it uses the correct, current template.My view:
My
core/exhibition_list.html
template:My
core/includes/exhibitions.html
template: