iPhone Javascript execution time

In the Apple docs it says that JavaScript execution time is limited to 10 seconds for each top-level entry point. If your script executes for more than 10 seconds, Safari on iPhone OS stops executing the script at a random placeI plan to have some Javascript run every 10 seconds or so that will do an AJAX query to the server and …

via iPhone Developers Faqs » Search Results » ajax:

iPhone Javascript execution time

In the Apple docs it says that
JavaScript execution time is limited to 10 seconds for each top-level entry point. If your script executes for more than 10 seconds, Safari on iPhone OS stops executing the script at a random place
I plan to have some Javascript run every 10 seconds or so that will do an AJAX query to the server and rewrite just the section of the page necessary. Will this be possible with these restrictions on the device?
………………………………..

Yes, it is possible, provided that you implement it using a callback that is invoked every 10 seconds, rather than busy waiting for 10 seconds. In other words, if you use setInterval to achieve this, then you’re fine.

For more info: iPhone Javascript execution time

iPhone Developers Faqs » Search Results » ajax

iPhone Javascript execution time

Share this post:

Related Posts

Leave a Comment