Skip to content

Instantly share code, notes, and snippets.

@markthepixel
Forked from hiroprotagonist/jqm-data-cache-never.js
Last active December 14, 2015 07:09
Show Gist options
  • Save markthepixel/5048279 to your computer and use it in GitHub Desktop.
Save markthepixel/5048279 to your computer and use it in GitHub Desktop.
Modified version of jqm-data-cache-never.js which allows for removal of all pages and keeping on pages marked.
// force certain pages to be refreshed every time.
// mark such pages with 'data-cache="keep"' to keep
//
jQuery('div').live('pagehide', function(event, ui){
var page = jQuery(event.target);
if(page.attr('data-cache') != 'keep'){
page.remove();
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment