dgileadi / zepto-page-transitions

HTML5 Page Transitions similar to JQuery Mobile page transitions, but standalone (13k) and using Zepto.js
166 stars 46 forks source link

data loaded via ajax lost #9

Closed jramillete closed 11 years ago

jramillete commented 11 years ago

Hi,

I've a problem using your library. When I load data via ajax and go to the next page, on history back i lost all data loaded and i have to load it again.

For example: Load a link list with data via ajax, go to any page with a link and go back, no data is shown.

Other issue i have seen is that "transition" tag in href created by ajax doesn't apply.

Thank you for your amazing library and your time!

dgileadi commented 11 years ago

I can think of two things you could try:

  1. Use the domCache option to keep old pages around. This will increase the amount of memory your app uses. Alternately you could add the data-dom-cache="true" attribute to your list page instead of caching all pages with the domCache option.
  2. Handle the pageinit event and load your list items in its callback instead of in a standard Zepto ready callback.