HTML and CSS Reference
In-Depth Information
Figure 3-10. CoreAnimation debug session (enlarged screen)
Fetching and Caching
Now it's time to take your page and resource caching to the next level. Much like the
approach that jQuery Mobile and similar frameworks use, you can prefetch and cache
your pages with concurrent AJAX calls. A few core mobile web challenges highlight the
reasons why following this approach makes sense:
Fetching
Prefetching your pages allows users to take the app offline and also eliminates wait‐
ing between navigation actions. Of course, you don't want to choke the device's
bandwidth when the device comes online, so you need to use this feature sparingly.
Caching
You want a concurrent or asynchronous approach when fetching and caching pages.
Because it's well supported among devices, you also need to use localStorage ,
which unfortunately isn't asynchronous.
AJAX and parsing the response
Using innerHTML() to insert the AJAX response into the DOM is dangerous, and
it could be unreliable according to http://martinkou.blogspot.com/2011/05/
alternative-workaround-for-mobile.html . Instead, I recommend a reliable
 
Search WWH ::




Custom Search