21a68d65206abc508c6400214aea8da6bc22b339
chmalee
  Wed May 5 15:51:28 2021 -0700
Fix some hgTracks back button problems by disable web browser caching of CGI responses, refs #26627

diff --git src/hg/lib/cart.c src/hg/lib/cart.c
index 8202c14..4dd997d 100644
--- src/hg/lib/cart.c
+++ src/hg/lib/cart.c
@@ -2295,30 +2295,32 @@
                                    struct hash *oldVars, boolean doContentType)
 /* Load cart from cookie and session cgi variable.  Write cookie
  * and optionally content-type part HTTP preamble to web page.  Don't
  * write any HTML though. */
 {
 // Note: early abort works fine but early warn does not
 htmlPushEarlyHandlers();
 struct cart *cart = cartForSession(cookieName, exclude, oldVars);
 popWarnHandler();
 popAbortHandler();
 
 cartWriteCookie(cart, cookieName);
 if (doContentType && !cartDidContentType)
     {
     puts("Content-Type:text/html");
+    // disable web browsers from caching CGI responses:
+    puts("Cache-Control: no-store");
     puts("\n");
     cartDidContentType = TRUE;
     }
 return cart;
 }
 
 struct cart *cartAndCookie(char *cookieName, char **exclude,
                            struct hash *oldVars)
 /* Load cart from cookie and session cgi variable.  Write cookie and
  * content-type part HTTP preamble to web page.  Don't write any HTML though. */
 {
 return cartAndCookieWithHtml(cookieName, exclude, oldVars, TRUE);
 }
 
 struct cart *cartAndCookieNoContent(char *cookieName, char **exclude,