locked
Caching the dynamic listview?

    Question

  • 1.A html page with a listview,which is added data by winjs.xhr when the scrollbar is to the end.

    2.I can click the items on the listview, to reach the detail page.

    question:

    How can I click the back button on the detail page, to come back to the status,which is data loaded and scrollbar scrolled?Like the title quest?

     
    Wednesday, November 13, 2013 1:17 AM

Answers

  • Hi czlczlczl,

    In XAML, NavigationCacheMode is a good choice to cache data for a page, but unfortunately in JavaScript there is no such API, so the answer for your title is No.

    But you could initialize the data in the ready function of the page, when you request Web resources by using WinJS.xhr, the response might be cached, which means that later requests will return the version of the resource that already exists on the client computer rather than resending the request. Kind of cache actually.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Thursday, November 14, 2013 1:19 AM
    Moderator