I recently asked a question relating to the javascript not working on my site through the iphone. Thanks to someone pointing me to the debug console on iphone I discovered this was due to Javascript execution exceeding timeout limit.
I previously had all my javascript combined in one all.js file so I decided to split it up in an attempt to pinpoint the problem – I had found some posts talking about using timouts to break up the javascript and give it a chance to catch its breath. Unfortunately in doing this I have discovered that the offending script is a minified version of jquery which is taking to long to load.
Before anyone says build a seperate mobile site – this is lots of work I dont have time to do right now but will be looking at doing later. For now I would at least expect my site using one of the most popular javascript libraries to load on one of the most popular mobile devices through a wi fi connection. Can it really be the case that the iphone cant load any website using jquery even through a wi-fi connection? Is half the web broken for iphone users.
Is there anything I can do about this?
Solved*
*Solved*
I know the question was poorly worded and I probably shouldnt have blamed the iphone & jquery but if anyone is interested what this turned out to be it was actually down to another script used for truncating text. This script was recommended to me in response to another question I asked and is called elipses.js – it works great on desktop browsers but for some reason was upsetting iphone and iphone was wrongly pointing the finger at jquery.
Link to question with script in is http://goo.gl/PsQdt
If you have the same problem turn half your scripts off see which half stops the issue and keep narrowing down in the manner.
I have the jquery library and a plugin running that runs on all of the pages of my website (granted, my pages are fairly small, but still) and I haven’t ever had a problem loading the website on any mobile device. I have tested it using an iPhone, iPad, Android phone, and Windows Phone 7 device. Link your website so we can see what might be going on?