summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_html.class3
-rw-r--r--itjs.php2
2 files changed, 4 insertions, 1 deletions
diff --git a/it_html.class b/it_html.class
index 3834251..034d288 100644
--- a/it_html.class
+++ b/it_html.class
@@ -502,9 +502,10 @@ function head($args = array())
if ($p['js'])
{
+ $checksum = itjs::checksum(itjs::filenames($p['js']));
$js .= $this->_itjs("boot.js", "inline");
$js .= "function it_boot_start(){ " . trim($p['jsboot']) . " }\n";
- $js .= "it_boot('/itjs/" . $p['js'] . "');\n";
+ $js .= "it_boot('/itjs/" . $p['js'] . "?s=$checksum');\n";
}
$js .= $this->_itjs($p['jsinline'], 'inline');
diff --git a/itjs.php b/itjs.php
index 3055958..5c23b4a 100644
--- a/itjs.php
+++ b/itjs.php
@@ -40,6 +40,8 @@ else if (!ereg('\.html$', $file))
if ($checksum != $_SERVER['HTTP_IF_NONE_MATCH'])
{
+ header("Cache-Control: max-age=900");
+
if ($_REQUEST['boot'])
$data = preg_replace('/([\xa0-\xff])/e', 'sprintf("\\u%04x", ord("\\1"))', $data) . "window.it_boot_init();";