Skip to content

Trying to removing caching on JQuery Mobile

April 11, 2011

Having used JQuery Mobile beta 1.0a4.1 using the files jquery.mobile-1.0a4.1.min.js and jquery.mobile-1.0a4.1.min.css, when ever you open the dialog box in the main page, this causes JQuery Mobile to cache the history state of the page, adding the syntax #&ui-state=dialog which is fairly frustrating.

I have tried the following two methods to hide the content element so it is not saved in cache but to no prevail.

$(“div[data-role*=’page’]”).live(‘pagehide’, function (event, ui) {
    if ($(this).children(“div[data-role*=’content’]”).is(“.command-no-cache”))
        $(this).remove();
});

$(‘.ui-page’).live(‘pagehide’, function () { $(this).remove(); });

There has got to be a solution to this in the later versions of JQuery Mobile without altering the css or js files, or is this a known bug?

Otherwise from experience, you have to go back to v 1.0a2.1 to completely removing the cache but then you lose all the functionality of the select box which I use.

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: