Tuesday, August 12th, 2008
Squirreling out the Fish on the iPhone
-
-
<script type="text/javascript">
-
function recurse(n) {
-
if (n> 0) {
-
return recurse(n - 1);
-
}
-
return 0;
-
}
-
-
try {
-
// recurse(43687); // Highest that works for me in WebKit
-
// nightly builds as of 24 Jul 2008.
-
// recurse(2999); // Highest that works for me in Firefox 3.0.1
-
// recurse(499); // Highest that works for me in Safari 3.1.2
-
recurse(3000);
-
document.write("Could be SquirrelFish.");
-
} catch(e) {
-
document.write("Not SquirrelFish.");
-
}
-
</script>
-
This is the hack that John Grubber used to test whether iPhone 2.x had snuck in SquirrelFish. He was curious due to the performance improvements that he witnessed:

What about iPhone limits though? David Golightly tests the limits on the iPhone with a script that keeps downloading tiles until it can no longer do so:
After downloading about 210 images, the iPhone simply stops downloading new ones. This is probably due to hitting the hard 30MB same-page resource limit.
Related Content:











So basically, when SquirrelFish hits, it will hardly show up on the graph. :D