On Dec 21, 4:53 pm, Webtekie <[EMAIL PROTECTED]> wrote: > I tried your solution and it seems to work intermittently.
There are probably parts of the page that stall loading, which on iPhone Safari translates into ignoring of scroll requests. Hence after scrollTo, another timer event 50-100ms later needs to check the position and retry the scroll if the previous one didn't take. That is repeated until it sticks (it's important to check in a separate later event, not within the same thread activation that issued scrollTo, otherwise you will get false positives). You may try doing a test with iPhone connected to your server via Wi-Fi LAN (directly to your LAN IP such as 192.168.1.10) which would eliminate most loading delays. (You would need a local http server for this.) The iPhone http handling is still very poor, even though it improved somewhat in 1.1.2. During page load, they open large number of separate tcp connections and needlessly close them, only to open the new one within milliseconds for the next page item. Each new tcp connection requires a full 3-packet back & forth, which is a huge waste of time especially when your connections have large latency (as is the case with most EDGE connections). The iPhone Safari would greatly benefit from a through review and completion of their networking code. Another test you may try is to selectively comment out sections of your page or script until you locate those which cause most problems. With this method I found that in my iPhone application (remote PC application control, myf2p) the main showstopper in bringing up the initial application screen were 12 small cursor files. By merging them into a single png image file (then slicing them out into small canvases), the total size of payload alone was cut to 1/4th, the number of connections and http headers to 1/12th and the startup speed imroved dramatically. Still, in order to obtain reliable scrolls on any network, I had to add polling and retries from timer events. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en -~----------~----~----~----~------~----~------~--~---
