How should I write Jquery Mobile app for browsers with and without javascript support?

Posted by Adrian Grigore on Stack Overflow See other posts from Stack Overflow or by Adrian Grigore
Published on 2011-01-07T00:57:31Z Indexed on 2011/01/07 1:53 UTC
Read the original article Hit count: 445

Hi,

I'm trying to wrap my head around jQuery Mobile. My aim is to build a very fast application with a look and feel as close as possible to a native app (at least for modern devices).

I understand there are two ways of navigating between pages:

  1. Loading each page as a separate page and linking to other pages with regular html anchors.

  2. Putting all (or many) pages on one single web page and navigating between them by means of javascript ($.mobile.changePage (method) and similar api functions.

The first approach should work on all browsers, but performs quite poorly since there is a delay between each page transition.

The second looks like it should be much faster, so I would definitely prefer this approach. But how would that work for mobile device browsers without javascript support? It certainly seems to violate jQuery Mobile's aim to provide a gracefully degraded experience for C-grade browsers.

It looks to me like I need to implement my app twice, once optimized for browsers with javascript support, once for browsers without? Using may be another option, but that looks even more messy.

What's the recommended way to approach this dilemma? Is there anything I have not noticed?

Thanks,

Adrian

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery