diff --git a/freepost/__init__.py b/freepost/__init__.py index 9aeb8f8..aef0098 100755 --- a/freepost/__init__.py +++ b/freepost/__init__.py @@ -127,6 +127,12 @@ def homepage (): else: posts = [] + # Disable browser caching + # Fix issue: https://notabug.org/zPlus/freepost/issues/80 + response.set_header('cache-control', 'no-cache, no-store, must-revalidate') + response.set_header('pragma', 'no-cache') + response.set_header('expires', '0') + return template ('homepage.html', posts=posts, sort=sort) # TODO implement this @@ -501,6 +507,12 @@ def post_thread (hash_id): comments = children () + # Disable browser caching + # Fix issue: https://notabug.org/zPlus/freepost/issues/80 + response.set_header('cache-control', 'no-cache, no-store, must-revalidate') + response.set_header('pragma', 'no-cache') + response.set_header('expires', '0') + return template ( 'post.html', post=post,