user694688
user694688

Reputation: 683

JQuery Mobile - Implement site without dom caching

Am doing the following when using JQM. Please let me know the impact.

  1. Am not using dom caching when using JQM. Have completely removed dom caching for the site.
  2. Am loading some links without AJAX.
  3. How can we specify the page expiry in JQM, if we have to implement it. If we disable AJAX based of loading in JQM by using $.mobile.ajaxEnabled = false, what will be the impact. If we disable AJAX completely, then we can specify the page expiry. Is it not?

Please provide your valuable inputs so that it will help others who are looking out for the same topic.

Upvotes: 0

Views: 78

Answers (1)

Ajith S
Ajith S

Reputation: 2917

Impacts:

Caching pages keep previously-visited pages in the DOM instead of removing them, so that they are available instantly if the user
returns to them. To remove caching, you could do,

$(document).bind("mobileinit", function(){
   $.mobile.page.prototype.options.domCache = false;    
});

If you are not caching page, previous page will not be instantly available.

The drawback of DOM caching is that the DOM can get very large, resulting in slowdowns and memory issues on some devices

Refer link1, Refer link2

data-ajax="false" will be loaded with full refreshment of the page, with no animated transition

Refer link3

For setting expiration of page Refer link4

If you disable ajax completely, there will not be a smooth animated transition to your next page

Upvotes: 1

Related Questions