07-26-2012 06:28 PM
07-26-2012 06:42 PM
Alright, so what we have here with my and agorilla's testing is:
My sample, which works on my device, does not work on agorilla's device. I also tested agorilla's website on my device and it all looked/worked fine. However agorilla's device does not render his website properly.
This points very heavily at a device-specific issue. That being said, agorilla notes that at one point, the rendering was working fine, and now it is not.
We'll keep that on the backburner, but I was wondering if you could check the following device software update site and, for your carrier, check if there are any new OS versions available:
In the meantime, I'm going to put together a sample with PreloadJS. This will help verify whether it is:
1) A matter of the resources failing to load; or
2) A matter of the device simply failing to acknowledge the resources.
07-26-2012 08:35 PM
Alright, I scrapped PreloadJS since it uses XHR and kept raising cross-domain errors, however I've put together one more sample agorilla. Can you please host and try the following code.
Disclaimer: I do not recommend this method of loading scripts in general. It is by no means a best practice. But what it does do is ensure that the jQuery Mobile script is loaded after the core jQuery script. The reason for this is that I was able to produce the issue in the specific case where jQuery Mobile gets loaded before core jQuery.
I did this using Web Inspector's resource loading panel.
In addition, agorilla, the way you have set up your <head> should load them in the correct order. However, if this script below works, then it points very likely at the fact that there is a race condition on your device, and the jQuery Mobile script is winning; however since core jQuery is not yet loaded, it bombs out and fails to format your content. It could be an OS/browser bug on that specific version which has a different meaning of synchronous script loading.
This is very much just a sanity check to rule out the race condition, in your specific case.
Again, while there is nothing dangerous about this script, it is far from best practices.
07-27-2012 08:56 AM
What you say has lot of sense, but didnt work either. I started playing with cache, allowing or disallowing js, geolocation, images and stuff and at one moment for the first load worked again but it stop working instantly after that. So as you said i will try to update, and hope its somthing really particular from the phone i have.
07-27-2012 10:27 AM - edited 07-27-2012 10:28 AM
Thanks for the help testing here agorilla. In addition to yesterday's code, this morning I ran another test that:
2) In that file, I inserted the core jQuery code first. Everything worked fine.
3) I modified the custom script file so that jQuery Mobile scripts appear before core jQuery scripts; and once again I saw the rendering issues.
It seems that this is absolutely one scenario that will cause problems. Though not necessarily the case in your situation, I would highly recommend, for the time being at least, to concatenate the JQ and JQM JS files into one, with JQ appearing first; this will for the time being remove this possibility as the cause.
That being said, the "temporary working" seems to strengthen "device side" in your case. If you can find a specific set of actions that allow it work even once, consistently, that might give us some insight. The most likely seems to be clearing the cache, but it's hard to say at this point. If you do go ahead with the upgrade, please let us know how it goes.