Commit 4c66f62a authored by Jörn Zaefferer's avatar Jörn Zaefferer

Improved Mikes hack to ease testing against IE cache

parent c3d8cb0c
...@@ -3,5 +3,5 @@ html text<br/> ...@@ -3,5 +3,5 @@ html text<br/>
testFoo = "foo"; $('#foo').html('foo'); testFoo = "foo"; $('#foo').html('foo');
ok( true, "test.html executed" ); ok( true, "test.html executed" );
/* ]]> */</script> /* ]]> */</script>
<script src="data/test.js"></script> <script src="data/test.js?<?php srand(); echo time() . '' . rand(); ?>"></script>
blabla blabla
\ No newline at end of file
...@@ -192,3 +192,16 @@ function t(a,b,c) { ...@@ -192,3 +192,16 @@ function t(a,b,c) {
s += (s && ",") + '"' + f[i].id + '"'; s += (s && ",") + '"' + f[i].id + '"';
isSet(f, q.apply(q,c), a + " (" + b + ")"); isSet(f, q.apply(q,c), a + " (" + b + ")");
} }
/**
* Add random number to url to stop IE from caching
*
* @example url("data/test.html")
* @result "data/test.html?10538358428943"
*
* @example url("data/test.php?foo=bar")
* @result "data/test.php?foo=bar&10538358345554"
*/
function url(value) {
return value + (/\?/.test(value) ? "&" : "?") + new Date().getTime() + "" + parseInt(Math.random()*100000);
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment