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
commit75aff135eda72ac345466c3b273290e7a01cedda (patch)
tree98df3d0399e1f5b3a6f38adb11d9e1eca7d157f6
parent0643dd336bd6e23013b0d901d73127829ac469eb (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;",