Best way to cache page.


  • I have a ListView with 500+ items in it. When you click on the item it navigates to the details page of the item.  When I hit the back button all 500+ items have to be reloaded and the scroll position is reset.  Is there a built in way to cache the page so it won't reload on the navigation back?

    Friday, July 13, 2012 10:01 PM

All replies

  • Monday, July 16, 2012 9:43 AM
  • That solution is not ideal in my case. My ListView uses a virtualized data source and I have to make another async service call for each item that in the list so depending on when the user clicks an item there could be some complicated timing issues occurring if I just store the datasource off.  I think my best solution is to load an Iframe above my listview that takes up the entire screen and show the details in there.  I then can simply hide the iframe when the user wants to navigate back to the ListView.  This maintains my current scroll position and keep my items from be reloaded.  This is still not as easy as it sounds since I need to handle the events the navigator object handles and I am not sure how tombstoning will effect this page. I have noticed a lot of the third party apps (Dailymotion, USA Today, etc.) in the marketplace do not handle this problem at all. This renders that app almost useless.  It is a shame this is not handle automatically by the framework like it is on the windows phone.

    • Marked as answer by Dino He Friday, July 20, 2012 10:14 AM
    • Unmarked as answer by Dino He Friday, July 20, 2012 10:15 AM
    Monday, July 16, 2012 1:07 PM