Response title
This is preview!
Yes, there's one good reason not to do this: you're asking the browser to load one big-ass document containing your entire site. Can you guess what's going to happen next in a constrained mobile browser?Would there be any reason why larger mobile sites could not be created using the data-role function for all pages?So for example a mobile site with 100+ pages could use the one html document with all 'pages' included and accessed via the data-role function, rather than splitting the pages into separate html documents as per a traditional website.
Actually, no, you can't. Well, you can, but you're not going to like the result. You can move between single-page and multi-page documents, but every time you do, the entire framework will be reloaded, because you will have to link rel="external".I understand that I could use a mix of both
What do you think might be an acceptable number of pages to data-role?
A handful
I take it the best practice for larger mobile sites is to build all pages in the conventional manner and use transitions via the ajax calls
Yes, I would say so.
I think multi-page documents are useful for small mobile apps that have a small number of pages that typically have inner content updated using Ajax techniques.I'm guessing data-role is therefore a nice feature built into JQM to make small mobile sites act more like native apps in terms of speed and fluidity of page transitions?
But you can achieve the same thing using multiple pages with data-dom-cache and data-prefetch. It allows you better organization and you can easily change your mind about just which pages are cached.
© 2013 jQuery Foundation
Sponsored by and others.