JavaScript execution timed out - jQuery mobile

I created a mobile application based on jQuery mobile framework.

I use wordpress as cms.

Everything seems to be working fine. But after some time, moving back and forth around the application, suddenly the buttons become invisible with this javascript error.

JavaScript error on line 16
http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js
JavaScript execution timed out

What does this error mean, and why does it not happen instantly? And how is his mistake inside jQuery itself, never seen this before?

My experience with javascript errors is that if it is erroneously / broken in the first place, you get an error right away.

The error is performed mainly when navigating archive pages containing large lists.

I understand that it is almost impossible to say what it is if you do not see the application or play with it - but did someone experience similar java script errors?

When an error occurs, you can still use the application, but sometimes it completely blocks it.

Any thoughts would be most helpful - as I desperately need a correction

I am also viewing this Mobile Safari on the iPhone 3GS.
Mozilla / 5.0 (iPhone, U, CPU iPhone OS 4_3_5, like Mac OS X, en-us) AppleWebKit / 533.17.9 (KHTML, e.g. Gecko) Mobile / 8L1

+4
source share
4 answers

Feels like a Safari bug.

Just got the same javascript exception with several other popular, javascript intensive libraries on iOS5.

An exception occurs sometimes when I use the scroll library and pdf.js. Even sample pages for these libraries make my iPad occasionally throw this exception.

I am using iPad 2 with the first stable version of iOs 5.

User agent: Mozilla / 5.0 (iPad, OS 5_0, like Mac OS X) AppleWebKit / 534.46 (KHTML, for example, Gecko) Version /5.1 Mobile / 9A334 Safari / 7534.48.3

+1
source

The list looks too long to process, and the browser kills it (scripts), but there may be other factors.

Put some code and I will try to help.

0
source

Only a pointer, possibly in the right direction:

I get the same error when I start the transition while the previous transition still does not work. If I wait for the transition to complete (and the โ€œinstallโ€ screen), and then perform the next transition, everything will be fine. However, if I initiate the next transition before the end of the last, I also get this error.

JQM has transitional discharge, perhaps a problem with it.

0
source

Reboot the device. Also, consider downloading jQuery and jQuery mobile at the end of your script:

<script src="//code.jquery.com/jquery-1.7.1.min.js"></script> <script>window.jQuery || document.write('<script src="js/jquery-1.7.1.min.js"><\/script>')</script> <script src="//code.jquery.com/mobile/latest/jquery.mobile.min.js"></script> <script>window.jQuery.widget || document.write('<script src="js/jquery.mobile.min.js"><\/script>')</script> 

I was getting โ€œJavaScript timed outโ€ on my iPhone 4S right after loading jQuery mobile 1.0 and was running for the first time in the head script element. Rebooting my phone fixed it, so in my case it was a bug with iOS5 Mobile Safari.

I did not try the above, but perhaps give a second chance to run the script, I could do the trick - maybe even try to enter the script element in the DOM, like Facebook, and Google Analytics recommends writing, rather than using the document.

0
source

All Articles