Activate your free membership today | Log-in

Tuesday, August 12th, 2008

Squirreling out the Fish on the iPhone

Category: JavaScript, Mobile, Performance, iPhone

HTML:
  1.  
  2. <script type="text/javascript">
  3. function recurse(n) {
  4.     if (n> 0) {
  5.         return recurse(n - 1);
  6.     }
  7.     return 0;
  8. }
  9.  
  10. try {
  11.     // recurse(43687);  // Highest that works for me in WebKit
  12.                         // nightly builds as of 24 Jul 2008.
  13.     // recurse(2999);   // Highest that works for me in Firefox 3.0.1
  14.     // recurse(499);    // Highest that works for me in Safari 3.1.2
  15.     recurse(3000);
  16.     document.write("Could be SquirrelFish.");
  17. } catch(e) {
  18.     document.write("Not SquirrelFish.");
  19. }
  20. </script>
  21.  

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.

Posted by Dion Almaer at 6:11 am

++++-
4.4 rating from 18 votes

1 Comment »

Comments feed TrackBack URI

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

Comment by eyelidlessness — August 12, 2008

Leave a comment

You must be logged in to post a comment.