versus Multi-Page Documents

You will need to identify page access trends to determine which strategy makes most sense from a bandwidth and response time perspective. Multi-page documents will consume more bandwidth on their initial load but they only require a single server request and as a result their sub-pages are loaded with very fast response times. A single-page document will consume less bandwidth per request but they require a server request per page which results in much slower response times.

If you have several pages that are commonly accessed in sequence they make an ideal candidate to load upfront within the same document. The initial bandwidth hit is slightly higher but we achieve instant responses when accessing the next page. However, if the probability is low that the user will access both pages then you should opt to keep the files separate and achieve a lower bandwidth hit on the initial load.

There are tools available to help you collect page access trends and other metrics to help optimize your page access strategy. For example, Google Analytics2 or Omniture3 are common analytic solutions for Mobile Web applications.

__________

2 See http://www.google.com/analytics/.

3 See http://www.omniture.com/.

TIP: In most cases it is recommended to leverage the single-page model and dynamically append popular pages to the DOM in the background. We can achieve this behavior by adding the data-prefetch attribute to any link we want to dynamically load:

<a href="load-page-dynamically.html" data-prefetch></a>

This hybrid approach allows us to selectively choose which links we want to load and cache. Again, this pattern is only recommended for pages that are accessed very frequently because this behavior will trigger an additional HTTP request to load the page dynamically.CopycopyHighlighthighlightAdd NotenoteGet Linklink


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *