From 8a378317c0950d53727f05e0daf96926c60238ce Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 3 Nov 2021 18:15:13 -0500 Subject: [PATCH] Try to prevent caching for any /index (grid) page if this works, maybe also should do it for /view since that can have a rows grid? --- tailbone/views/master.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tailbone/views/master.py b/tailbone/views/master.py index ce7fcca7..46b652e8 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -3941,7 +3941,13 @@ class MasterView(View): "List / search {}".format(model_title_plural)) config.add_route(route_prefix, '{}/'.format(url_prefix)) config.add_view(cls, attr='index', route_name=route_prefix, - permission='{}.list'.format(permission_prefix)) + permission='{}.list'.format(permission_prefix), + # hopefully, instruct browser to never cache this page. + # on windows/chrome we are seeing some caching when e.g. + # user applies some filters, then views a record, then + # clicks back button, filters no longer are applied + # cf. https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/viewconfig.html#non-predicate-arguments + http_cache=0) # download results # this is the "new" more flexible approach, but we only want to