diff options
-rw-r--r-- | itjs.php | 4 | ||||
-rw-r--r-- | itjs/boot.js | 8 |
2 files changed, 7 insertions, 5 deletions
@@ -69,9 +69,9 @@ else if (!it::match('\.html$', $file)) @header("Etag: $checksum"); -if ($checksum != $_SERVER['HTTP_IF_NONE_MATCH']) +if ($checksum != $_SERVER['HTTP_IF_NONE_MATCH'] || $_REQUEST['retry']) { - if (!preg_match('/Opera/', $_SERVER['HTTP_USER_AGENT']) && it::is_live()) + if (!preg_match('/Opera/', $_SERVER['HTTP_USER_AGENT']) && it::is_live() && !$_REQUEST['retry']) header("Cache-Control: max-age=900"); $data = itjs::strip($data); diff --git a/itjs/boot.js b/itjs/boot.js index 059bd78..80ad062 100644 --- a/itjs/boot.js +++ b/itjs/boot.js @@ -186,11 +186,12 @@ function it_boot(file, isretry) it_boot.file = file; it_boot.sequence = isretry ? "r" : "b"; var loader = it_boot_getloader(); + var bootparam = "boot=1" + (isretry ? "&retry=1" : ""); if (loader) { it_boot.sequence += "l"; - loader.open("GET", it_boot_addparam(file, "boot=1" + (isretry ? "&retry=1" : ""))); + loader.open("GET", it_boot_addparam(file, bootparam)); loader.onreadystatechange = function() { var error = "", code = ""; @@ -234,13 +235,14 @@ function it_boot(file, isretry) var doc = document; var dom = doc && (dom = doc.getElementById('it_boot_dom')); // HTML has been rendered it_boot.sequence += "n"; + bootparam += "&script=1"; if (window.opera || (document.all && navigator.platform.indexOf("Mac") >= 0)) - document.write('<sc'+'ript type="text/javascript" src="'+it_boot_addparam(file, 'boot=1&script=1')+'"><\/sc'+'ript>'); + document.write('<sc'+'ript type="text/javascript" src="'+it_boot_addparam(file, bootparam)+'"><\/sc'+'ript>'); else if (dom) { var tag = doc.createElement("script"); - tag.src = it_boot_addparam(file, 'boot=1&script=1&retry=1'); + tag.src = it_boot_addparam(file, bootparam); dom.appendChild(tag); } else |