AppCache painfully slows down on iOS

I am developing a web application using application cache and everything works fine on desktop browsers and Android (even very old and slow Android phones). However, loading appcache is significantly longer on iOS 6 in both Safari and Chrome.

The total cache size for my application is only 2.1 MB, and I have a pretty solid 70 Mbps Internet connection (download). I expect caching to be pretty fast.

Here are my times:

  • Desktop Chrome: <1s (similar times for Safari and Firefox)
  • Android 2.3.3 Stock Browser: ~ 4s (similar times for Chrome and Dolphin)
  • Android 4.2.2 (Emulated): ~ 7s (works in PhoneGap application)
  • iPhone 4S 6.0 Safari: 8 minutes !!! (about the same in Chrome iOS!)
  • iPad 2 6.0 Safari: as above.

All these devices use the same Wi-Fi and Internet connection, and my iPhone / iPad otherwise works fine (no native applications that show problems with the speed of the Internet, and regular site downloads are just fine). Something seems to completely destroy the download speed of AppCache on iOS.

window.applicationCache.statusduring this time appCache.DOWNLOADING, and I have an event progressthat counts the files as they are downloaded, so I'm sure it is not stuck elsewhere. It seems to be just loading time. What gives?

: iPhone , . , - .

(. - , -, , , , , ).

+5
2

, iOS Emulator Xcode Instruments, . ( , , , , ).

, - javascript, , , , iOS.

- ( , DIV s), JS- ...

        window.addEventListener("load",function() {
            // Set a timeout...
            setTimeout(function(){
                // Hide the address bar!
                window.scrollTo(0, 1);
            }, 0);
        });

... :

        $(document).scroll(
            function(e){
                window.scrollTo(0, 1);
            });

, scrollTo, . scroll , ( - ).

, , , . , , ( jquery-debounce, - ):

        $(document).scroll(
            $.throttle(function(e){
                window.scrollTo(0, 1);
            })
        , 10);

Android. !

+2

, scrollTo , ! , JavaScript iOS - JavaScript .

0

All Articles