Using Images Efficiently

On today's networks, bandwidth is still limited, and users are going to have to wait as they download images to their phones. Images cannot be interlaced to load progressively, and WAP browsers today are not using the layout hints that can be included to hold the space on the card for the image while it still loads. As a result, you should think about where, how, and why to include images in your WML application before doing do.

Using a Splash Screen

One of the most popular uses of images in WAP applications today is as part of a splash screen. This example uses timers, which we'll discuss in detail in Chapter 10, "Using Timers." The code for a splash screen card would look something like this:

 <?xml version="1.0"?> ...

Get WAP Development with WML and WMLScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.