You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
My jQuery Mobile 1.3.0 beta 1 site is set up as a bunch of "single-page" pages, and every page is set to be cached and prefetched (I've triple-ensured this by setting "data-dom-cache" on each "page", setting "data-prefetch" on each A element, and also setting $.mobile.page.prototype.options.domCache = true;). Additionally, I've turned off all transitions.
Actually, my site setup isn't important to this bug, because the "persistent toolbars" example in the jQuery Mobile documenation will act just like my site, since it prefetches all the pages in its toolbar.
With this setup, I would expect my fully-prefetched and fully-cached single-page site (and the "persistent toolbars" example) to work exactly like a multi-page site. However, it doesn't.
On my HTC Evo 3D Android phone, if I browse the multi-page example in the demos & documentation, I can switch from page one to page two without the browser URL appearing. This is as I would expect. However, when I browse my site OR I browse the "persistent toolbar" example in the demos & documentation, each button I click on causes the browser URL to appear and the page momentarily turns white while the next page loads.
This happens on both the built-in browser and on the latest Android Opera browser.
To drive home the point, there are two different results:
Multi-page site: Clicking on page "two" causes smooth transition to page "two". No browser address bar, no blank white page. It acts exactly as one would expect.
Single-page site with second page prefetched and cached: Clicking on page "two" causes the address bar to pop open and then the page to turn white. Then after a few moments, page "two" appears and then the browser address bar goes away.
If you enable transitions, this behavior gets even worse, but I won't go into that. I'm fine with getting this working without transitions.
I've verified that all the pages of my site have been prefetched into the DOM. If I browse the DOM, I see all of the pages sitting there directly below the body tag. I did some comparison of the DOM result of both site setups, and the only difference I can see between my single-page templates and the multi-page templates, is that in the DOM, my single-page templates have two extra attributes added to them by the framework: "data-url" and "data-external-page".
So why do multi-page-templates and multiple, cached single-page-templates result in different behaviors, and how do I make them act the same? I'd hate to have to go back and rewrite my entire site to use one giant multi-page template.
The text was updated successfully, but these errors were encountered:
@joshmouch This issue hasn't been updated in about a year and a half. Can you confirm if it is still an issue with the latest jQM? Can you also provide a jsbin test case so that someone can reproduce and look into a fix?
My jQuery Mobile 1.3.0 beta 1 site is set up as a bunch of "single-page" pages, and every page is set to be cached and prefetched (I've triple-ensured this by setting "data-dom-cache" on each "page", setting "data-prefetch" on each A element, and also setting $.mobile.page.prototype.options.domCache = true;). Additionally, I've turned off all transitions.
Actually, my site setup isn't important to this bug, because the "persistent toolbars" example in the jQuery Mobile documenation will act just like my site, since it prefetches all the pages in its toolbar.
With this setup, I would expect my fully-prefetched and fully-cached single-page site (and the "persistent toolbars" example) to work exactly like a multi-page site. However, it doesn't.
On my HTC Evo 3D Android phone, if I browse the multi-page example in the demos & documentation, I can switch from page one to page two without the browser URL appearing. This is as I would expect. However, when I browse my site OR I browse the "persistent toolbar" example in the demos & documentation, each button I click on causes the browser URL to appear and the page momentarily turns white while the next page loads.
This happens on both the built-in browser and on the latest Android Opera browser.
To drive home the point, there are two different results:
Multi-page site: Clicking on page "two" causes smooth transition to page "two". No browser address bar, no blank white page. It acts exactly as one would expect.
Single-page site with second page prefetched and cached: Clicking on page "two" causes the address bar to pop open and then the page to turn white. Then after a few moments, page "two" appears and then the browser address bar goes away.
If you enable transitions, this behavior gets even worse, but I won't go into that. I'm fine with getting this working without transitions.
I've verified that all the pages of my site have been prefetched into the DOM. If I browse the DOM, I see all of the pages sitting there directly below the body tag. I did some comparison of the DOM result of both site setups, and the only difference I can see between my single-page templates and the multi-page templates, is that in the DOM, my single-page templates have two extra attributes added to them by the framework: "data-url" and "data-external-page".
So why do multi-page-templates and multiple, cached single-page-templates result in different behaviors, and how do I make them act the same? I'd hate to have to go back and rewrite my entire site to use one giant multi-page template.
The text was updated successfully, but these errors were encountered: