Recently, I had to debug problems with a JQuery Mobile application that I maintain– primarily, it wasn’t working with Blackberry devices. I downloaded a ‘simulator’ from RIM and got to work… The simulator is incredibly clunky, but I eventually figured it out and confirmed that the mobile web app did not work on Blackberry.
It seemed as thought he Blackberry was being excessively strict with parsing the html– enforcing xml entity quotes, etc. etc… Eventually, after trying some fixes that got me partially there, I opened WireShark and tested what headers were going across the wire that were different on JQM’s demo(which worked fine), and my mobile web app… Low and behold, I found it. JQM’s demo was properly serving a content-type of ‘text/html’, and my app was serving ‘application/xhtml+xml’.. WTF?
I was finally able to determine that a mobile.browser file I had in my ASP.NET application was causing the problem. It was CHANGING the response type based on some archaic entry in this file– which I only use for detecting if the current browser is mobile or not for redirecting reasons… I hacked the file to server text/html as it should be, and Blackberry is working MUCH better now… I still have to do a full regression of testing to make sure everything works, but this definitely appears to be the major issue that was causing problems…
So, maybe Blackberry isn’t so bad. At least it isn’t giving me Javascript timeout errors like the iPhone 3G…