diff options
author | Adam Chlipala <adam@chlipala.net> | 2013-12-12 10:31:34 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2013-12-12 10:31:34 -0500 |
commit | 7b68961399bb9e1576e1355c084bb2a95853c03a (patch) | |
tree | 78116f57d7ba6df7d9b1abbe56d193c018904845 | |
parent | ee894ab162bd237456a7a11d59bba4f05daa93e7 (diff) |
Only output Content-script-type header when there is client-side code
-rw-r--r-- | src/cjr_print.sml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml index dec21eb3..798492d6 100644 --- a/src/cjr_print.sml +++ b/src/cjr_print.sml @@ -3072,8 +3072,10 @@ fun p_file env (ds, ps) = newline] | _ => [string "uw_write_header(ctx, \"Content-type: text/html; charset=utf-8\\r\\n\");", newline, - string "uw_write_header(ctx, \"Content-script-type: text/javascript\\r\\n\");", - newline, + case side of + ServerOnly => box [] + | _ => box [string "uw_write_header(ctx, \"Content-script-type: text/javascript\\r\\n\");", + newline], string "uw_write(ctx, begin_xhtml);", newline, string "uw_mayReturnIndirectly(ctx);", |