mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
/browse: Force AJAX requests to never be cached as the user has no way of requesting a refresh for them.
This commit is contained in:
parent
1c2ff97a5d
commit
8f371fdd4f
@ -156,6 +156,7 @@ function category() {
|
|||||||
if (href) {
|
if (href) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:href,
|
url:href,
|
||||||
|
cache: false,
|
||||||
data:{'sort':cookie(sort_cookie_name)},
|
data:{'sort':cookie(sort_cookie_name)},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
this.children(".loaded").html(data);
|
this.children(".loaded").html(data);
|
||||||
@ -212,6 +213,7 @@ function load_page(elem) {
|
|||||||
url: href,
|
url: href,
|
||||||
context: elem,
|
context: elem,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
|
cache : false,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
timeout: 600000, //milliseconds (10 minutes)
|
timeout: 600000, //milliseconds (10 minutes)
|
||||||
data: {'ids': ids},
|
data: {'ids': ids},
|
||||||
@ -263,6 +265,7 @@ function show_details(a_dom) {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: book.find('.details-href').attr('title'),
|
url: book.find('.details-href').attr('title'),
|
||||||
context: bd,
|
context: bd,
|
||||||
|
cache: false,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
timeout: 600000, //milliseconds (10 minutes)
|
timeout: 600000, //milliseconds (10 minutes)
|
||||||
error: function(xhr, stat, err) {
|
error: function(xhr, stat, err) {
|
||||||
|
@ -168,6 +168,9 @@ class Endpoint(object): # {{{
|
|||||||
sort_val = cookie[eself.sort_cookie_name].value
|
sort_val = cookie[eself.sort_cookie_name].value
|
||||||
kwargs[eself.sort_kwarg] = sort_val
|
kwargs[eself.sort_kwarg] = sort_val
|
||||||
|
|
||||||
|
# Remove AJAX caching disabling jquery workaround arg
|
||||||
|
kwargs.pop('_', None)
|
||||||
|
|
||||||
ans = func(self, *args, **kwargs)
|
ans = func(self, *args, **kwargs)
|
||||||
cherrypy.response.headers['Content-Type'] = eself.mimetype
|
cherrypy.response.headers['Content-Type'] = eself.mimetype
|
||||||
updated = self.db.last_modified()
|
updated = self.db.last_modified()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user