Sven: Unterschied Safari iPhone <=> Desktop-Browser? (JavaScript, CSS)

Hallo ihr,

ich hab grade nach einer Übersicht gesucht, in welchem Maße der mobile Safari, wie er auf iPhone/iPod Touch/iPad zum Einsatz kommt, beschnitten wurde.

Dass er kein Flash kann ist mir klar... was aber auch weniger am Browser als viel mehr am fehlenden Plugin liegt. Aber wie sieht es mit JavaScript und CSS aus? Kann er da mithalten?

Vielleicht hat da jemand mehr Infos, ich hab jedenfalls nichts gefunden.

Grüße
Sven

  1. Die geringere Speichermenge führt dazu, dass schon bei etwas höherem Speicherverbrauch, Ausführungszeit oder Rekursionstiefe Scripte abgebrochen werden. Abgesehen davon hat der mobile Safari insbesondere mit iframes ein Problem: deren Größe wird normalerweise unabhängig von Attributangaben an den Inhalt angepaßt, ein Scrollen ist nicht möglich, wohl aber, die Größe mit JS zu manipulieren, was dazu führen kann, dass der Inhalt abgeschnitten wird und nicht mehr erreichbar ist.

    Des weiteren hat der mobile Safari zusätzliche Events (onorientationchange, ontouchbegin, ontouchend, ...) und Eigenschaften (window.orientation, ...) im Vergleich zur Desktop-Version.

    Darüber hinaus besteht nahezu die gleiche HTML5-Unterstützung: <video> kann zwar nur im externen Player angezeigt werden, <canvas> funktioniert aber ganz normal.

    Gruß, LX

    --
    RFC 1925, Satz 2: Egal, wie fest man schiebt, ganz gleich, wie hoch die Priorität ist, man kann die Lichtgeschwindigkeit nicht erhöhen.
  2. 'ǝɯɐu$ ıɥ

    Hallo ihr,

    ich hab grade nach einer Übersicht gesucht, in welchem Maße der mobile Safari, wie er auf iPhone/iPod Touch/iPad zum Einsatz kommt, beschnitten wurde.

    Dass er kein Flash kann ist mir klar... was aber auch weniger am Browser als viel mehr am fehlenden Plugin liegt. Aber wie sieht es mit JavaScript und CSS aus? Kann er da mithalten?

    Vielleicht hat da jemand mehr Infos, ich hab jedenfalls nichts gefunden.

    Apple hat da infos:
    Know iPhone OS Resource Limits

    Your webpage performing well on the desktop is no guarantee that it will perform well on iPhone OS. Keep in mind that iPhone OS uses EDGE (lower bandwidth, higher latency), 3G (higher bandwidth, higher latency), and Wi-Fi (higher bandwidth, lower latency) to connect to the Internet. Therefore, you need to minimize the size of your webpage. Including unused or unnecessary images, CSS, and JavaScript in your webpages adversely affects your site’s performance on iPhone OS.

    Because of the memory available on iPhone OS, there are limits on the number of resources it can process:

    *

    The maximum size for decoded GIF, PNG, and TIFF images is 3 megapixels.

    That is, ensure that width * height ≤ 3 * 1024 * 1024. Note that the decoded size is far larger than the encoded size of an image.
        *

    The maximum decoded image size for JPEG is 32 megapixels using subsampling.

    JPEG images can be up to 32 megapixels due to subsampling, which allows JPEG images to decode to a size that has one sixteenth the number of pixels. JPEG images larger than 2 megapixels are subsampled—that is, decoded to a reduced size. JPEG subsampling allows the user to view images from the latest digital cameras.

    The maximum size for a canvas element is 3 megapixels.

    The height and width of a canvas object is 150 x 300 pixels if not specified.

    Individual resource files must be less than 10 MB.

    This limit applies to HTML, CSS, JavaScript, or nonstreamed media.

    JavaScript execution time is limited to 10 seconds for each top-level entry point.

    If your script executes for more than 10 seconds, Safari on iPhone OS stops executing the script at a random place in your code, so unintended consequences may result.

    This limit is imposed because JavaScript execution may cause the main thread to block, so when scripts are running, the user is not able to interact with the webpage.

    The maximum number of documents that can be open at once is eight.

    iPhone OS Note: In iPhone OS 1.1.4 and earlier, the JavaScript execution time was limited to 5 seconds and the size of allocations to 10 MB. Also, the limit on the size of canvas elements was the same as Safari on the desktop.

    iPhone OS Note: In iPhone OS 2.2.1 and earlier, the sum of all of the frames needs to be less than 2 megapixels—that is, width * height * number of frames ≤ 2 * 1024 * 1024. In iPhone OS 3.0 and later, the limit only applies to one frame at a time.

    ssnɹƃ
    ʍopɐɥs

    --
    Answers: $1, Short: $5, Correct: $25, dumb looks are still free ...