0

I wrote a pretty simple jquery mobile / phonegap app in xcode. In the simulator, it works like a charm. But the only device I have to test on is a second gen ipod touch from 2008, and when I test on the device, it is unbelievably slow, with page transitions sometimes taking as much as 25 seconds.

I have not written anything excessive or resource-demanding; in fact there's barely anything there. Just a couple divs and some text, but when I click a link to go to the next page, it takes a ghastly long time to do anything. It's practically frozen in the meantime.

Is this just because I'm using such an old device? Surely this isn't a problem with my code or the framework. (I know the first part of that sentence is laughable, but my code really is barebones-- nothing but a little basic html and some equally basic javascript.)

Prior to including jquery mobile, this all loaded reasonably quickly, in 1-2 seconds at most. After the revision; well, you already the question.

temporary_user_name
  • 35,956
  • 47
  • 141
  • 220

3 Answers3

0

I think browser is not supported.

Botz3000
  • 39,020
  • 8
  • 103
  • 127
stay_hungry
  • 1,448
  • 1
  • 14
  • 21
0

CSS effects are heavy on resources. Just add this before loading the jQuery Mobile library:

$(document).bind("mobileinit", function(){
  $.mobile.defaultPageTransition="none"
});

Stay away from transitions on old devices ;-)

Jack
  • 16,506
  • 19
  • 100
  • 167
0

one Cause
According to Google :
...mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.

some Solutions
1. Use fastclick.js to get rid of this 300ms lag
https://github.com/ftlabs/fastclick
2. Use application cache to speed up the load
https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache

Alain Gauthier
  • 820
  • 1
  • 12
  • 14