0

White page appears during page change using window.location = "otherpage.html" and happening only in the mobile but not desktop.

Any solution to this?

Carson Ip
  • 1,896
  • 17
  • 27

1 Answers1

0

It turns out that I have disabled the jquery mobile's ajax loading by using data-ajax="false" and directly use window.location = "otherpage.html". This causes the whole page to be fully reloaded and therefore we can see a white screen during loading.

The correct way should be

$.mobile.pageContainer.pagecontainer("change", "target", { options });

Reference: How to change page in jQuery mobile (1.4 beta)?

Community
  • 1
  • 1
Carson Ip
  • 1,896
  • 17
  • 27