prevent browsers from caching pages (which are usually generated)
authorpaul <paul@plutz.net>
Thu, 5 Apr 2018 12:18:58 +0000 (12:18 +0000)
committerpaul <paul@plutz.net>
Thu, 5 Apr 2018 12:18:58 +0000 (12:18 +0000)
svn path=/trunk/; revision=65

page.sh

diff --git a/page.sh b/page.sh
index 9b3b10c..def7280 100755 (executable)
--- a/page.sh
+++ b/page.sh
@@ -27,5 +27,7 @@ BODY="${BODY:-${_EXEC}/templates/${PAGE}.html.sh}"
 
 . "${_EXEC}/pages/${PAGE}.sh"
 
+# prevent browsers from caching generated pages
+printf "Cache-Control: no-cache, no-store, must-revalidate\r\nPragma: no-cache\r\nExpires: 0\r\n"
 printf "Content-Type: text/html;charset=utf-8\r\n\r\n"
 . "${_EXEC}/templates/frame.html.sh"