]> git.mjollnir.org Git - moodle.git/commitdiff
Add new headers to language stuff
authormoodler <moodler>
Thu, 12 Feb 2004 09:40:21 +0000 (09:40 +0000)
committermoodler <moodler>
Thu, 12 Feb 2004 09:40:21 +0000 (09:40 +0000)
lib/editor/lang/en.php

index 9eafa3ad6fc377bff80f06ae5bce74ef2a673394..d251379f77db03f6eb47655afd2d9c192724a855 100644 (file)
@@ -1,3 +1,15 @@
+<?php
+    include("../../../config.php");
+    $lastmodified = filemtime("en.php");
+    $lifetime = 1800;
+    header("Content-type: application/x-javascript");  // Correct MIME type
+    header("Last-Modified: " . gmdate("D, d M Y H:i:s", lastmodified) . " GMT");
+    header("Expires: " . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT");
+    header("Cache-control: max_age = $lifetime");
+    header("Pragma: ");
+?>
 // I18N constants
 
 // LANG: "en", ENCODING: UTF-8 | ISO-8859-1
 //   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
 //      (if this is not possible, please include a comment
 //       that states what encoding is necessary.)
-<?php
-       include("../../../config.php");
-       
-?>
 HTMLArea.I18N = {
 
        // the following should be the filename without .js extension