summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vladimir Shabanov <vshabanoff@gmail.com>2012-09-12 19:49:02 +0400
committerGravatar Vladimir Shabanov <vshabanoff@gmail.com>2012-09-12 19:49:02 +0400
commit8f7d05be6d40f30f1ec62a4069aa93d6d4514f38 (patch)
tree98df3d0399e1f5b3a6f38adb11d9e1eca7d157f6
parent81e1fd6e36aec4af5749ac06004a55ad4c9b6bc6 (diff)
Fixed HTTP date format and added Cache-Control to app.js
-rw-r--r--src/cjr_print.sml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index c1198ccf..33980f69 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -3239,7 +3239,7 @@ fun p_file env (ds, ps) =
val now = Time.now ()
val nowD = Date.fromTimeUniv now
- val rfcFmt = "%a, %d %b %Y %H:%M:%S"
+ val rfcFmt = "%a, %d %b %Y %H:%M:%S GMT"
in
box [string "#include \"",
string (OS.Path.joinDirFile {dir = !Settings.configInclude,
@@ -3430,6 +3430,8 @@ fun p_file env (ds, ps) =
newline,
string ("uw_write_header(ctx, \"Last-modified: " ^ Date.fmt rfcFmt nowD ^ "\\r\\n\");"),
newline,
+ string ("uw_write_header(ctx, \"Cache-Control: max-age=31536000, public\\r\\n\");"),
+ newline,
string "uw_write(ctx, jslib);",
newline,
string "return;",