Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6733097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:43:42+00:00 2026-05-26T10:43:42+00:00

I am working on a mobile web app that is primarily self-contained and communicated

  • 0

I am working on a mobile web app that is primarily self-contained and communicated with the server only when necessary. Currently, the libraries being used are:

  • jQuery 1.6.4
  • jQuery UI 1.8.3
  • Modified/patched version of jQTouch

Up until the release of iOS 5 we were also using touchscroll.js but it is no longer needed since Safari now supports position: fixed and native scrolling.

Since the release of iOS 5, seemingly at random, this exception is raised:

JavaScript: Error undefined JavaScript execution exceeded timeout

Once it is raised, no JS code that runs for more than a very short period of time (say 1ms) will be executed by Safari. Refreshing the page, going to a new page, or going to a new domain has no effect. Any and all JS code, even something as simple as

for(var i = 0; i < 30; i++) ;

will not be executed by the browser without the exception being raised. The only way around this is to force kill Safari and restart it. I suppose it is also possible to wrap any remotely “heavy duty” code in the application in a window.setTimeout(…, 1) or take advantage of Web Workers for everything but UI updates but that doesn’t seem like a very good solution as the application is fairly large and it would require a substantial rewrite.

Has anyone encountered this issue before? How would you go about debugging something like this as it isn’t any single piece of code that seems to put Safari into this broken state and it can happen seemingly at random?

I tried to figure out what the timeout of the JS engine is in mobile Safari by doing the following:

var start, end;
start = new Date();

try {
   while(true);
} catch (ex) {
  alert('test');
}

end = new Date();
console.log(Number(end) - Number(start) + 'ms');

Unfortunately it seems this timeout exception isn’t a JS exception so it cannot be caught in a try/catch block; however, it appears the max timeout period is in the realm of several seconds. None of the code in our app locks the browser/JS engine for that long (as it would provide a terrible UX) and most if not all of it probably has a sub 300ms execution time (including anything that’s “heavy duty”).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:43:43+00:00Added an answer on May 26, 2026 at 10:43 am

    Are you using watchPosition? see this answer if so: JavaScript execution exceeded timeout

    I’ve been ripping my hair out over this issue ever since iOS 5 was released – I feel your pain!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're working on a web app that will deployed to mobile devices, iPad, iPhone,
I am working on a mobile web app that outputs a number of CSS,HTML
I am currently working on a mobile web page in asp.Net MVC2 that allows
I'm working on an iOS metronome web app. Since mobile Safari can only play
I'm working on a Ruby on Rails/PostgreSQL web app that a mobile device communicates
I'm working on a mobile web app that needs to work in IE Mobile.
Im currently working on a mobile web app and am wondering if I should
So I'm working on a web app that makes use of the jquery mobile
I am working on an iPhone mobile web app using jqtouch to make it
I'm working on a mobile phone web app and I have several text fields

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.