d2487acc53819ca9b3a5f6df519408c3e4293e93
tdreszer
  Wed Oct 6 14:22:33 2010 -0700
Make cgi references to style sheets (css files) actually point to timestamped link.  Common code is also used for js files
diff --git src/hg/hgTracks/mainMain.c src/hg/hgTracks/mainMain.c
index d1d7220..7c26e4b 100644
--- src/hg/hgTracks/mainMain.c
+++ src/hg/hgTracks/mainMain.c
@@ -11,6 +11,7 @@
 #include "hash.h"
 #include "cheapcgi.h"
 #include "htmshell.h"
+#include "web.h"
 #include "cart.h"
 #include "hdb.h"
 #include "hui.h"
@@ -65,7 +66,10 @@
 htmlPushEarlyHandlers();
 cgiSpoof(&argc, argv);
 htmlSetBackground(hBackgroundImage());
-htmlSetStyle("<LINK REL=\"STYLESHEET\" HREF=\"../style/HGStyle.css\" TYPE=\"text/css\">\n");
+char * link = webTimeStampedLinkToResourceOnFirstCall("HGStyle.css",TRUE); // resource file link wrapped in html
+if (link)
+    htmlSetStyle(link);
+
 oldVars = hashNew(10);
 if (hIsGsidServer())
     cartHtmlShell("GSID Sequence View", doMiddle, hUserCookie(), excludeVars, oldVars);