From 7b8894fe5958275e6e5c2348ac40c91c48c49f9c Mon Sep 17 00:00:00 2001 From: Ashley Teoh Date: Fri, 30 Mar 2018 13:43:38 -0400 Subject: [PATCH] disable cache and etag --- notebook/nbconvert/handlers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/notebook/nbconvert/handlers.py b/notebook/nbconvert/handlers.py index 89995226e..23159346b 100644 --- a/notebook/nbconvert/handlers.py +++ b/notebook/nbconvert/handlers.py @@ -138,8 +138,12 @@ class NbconvertFileHandler(IPythonHandler): self.set_header('Content-Type', '%s; charset=utf-8' % exporter.output_mimetype) + self.set_header('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0') self.finish(output) + def compute_etag(self): + return None + class NbconvertPostHandler(IPythonHandler): SUPPORTED_METHODS = ('POST',)