dongtang9855 2015-11-11 18:11
浏览 60

使用JQuery Mobile AJAX导航强制刷新

I am developing a web app using JQuery Mobile (version 1.4.5) and PHP and I am having problems with using JQuery Mobile's AJAX-based navigation (HIJAX). Most of my application is dynamic and JQM often displays cached versions of the pages that have been visited previously. I have tried the following to prevent caching:

  • $.mobile.page.prototype.options.domCache = false;
  • HTML meta cache tags
  • data-dom-cache="false" when defining JQM pages
  • $.ajaxSetup({ cache: false });
  • data-ajax=false (works!)

The only thing that fixes the problem is to use data-ajax=false, which is not ideal because my iOS web app pops out into safari whenever it encounters hrefs (I have found another work-around for that, but still not ideal). Can anyone help me figure out how to force JQM to refresh while doing AJAX-based navigation?

Update: The web app uses single page navigation, not the multi-page per file system.

Thanks!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 matlab yalmip kkt 双层优化问题
    • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
    • ¥88 实在没有想法,需要个思路
    • ¥15 MATLAB报错输入参数太多
    • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
    • ¥15 有赏,i卡绘世画不出
    • ¥15 如何用stata画出文献中常见的安慰剂检验图
    • ¥15 c语言链表结构体数据插入
    • ¥40 使用MATLAB解答线性代数问题
    • ¥15 COCOS的问题COCOS的问题