What is the best practice organize a jQuery Mobile application?

后端 未结 4 1905
执念已碎
执念已碎 2020-12-31 22:27

I have found article that skims over this. But my main question is do I need a separate .html file for each screen? I am thinking yes but I would like an unanimous vote. Als

4条回答
  •  生来不讨喜
    2020-12-31 22:52

    This is a very subjective topic but is also becoming a much larger trend. Some prefer single page web sites (mobile apps). The wiki article here does a great job discussing the problem that single page apps solve.

    Specifically in JQM, the transitions from one page to the next are much smoother when the data is on the same page. This affect can also be achieved if you prefetch commonly used pages by adding the data-prefetch attribute to your link.

    However it may depend largely on the size of your project. The jQuery Mobile documentation touches on some of the performance issues of large DOMs here.

提交回复
热议问题