Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

option to cache or not cache a "sub-page"  #1471

Closed
@trainiac

Description

@trainiac

Perhaps this already exists or there is some workaround for what I am trying to do, but I am not sure, hence the issue log :)

In my very simple web app all I have on the initial page is a list of my friends and let's say I have 40 and each list item has a link in the following structure:

  1. www.example.com/profile.html?id=2
  2. www.example.com/profile.html?id=3
    ...

or

  1. /profile/2/
  2. /profile/3/

..

If a user browses 10 of his friends there are now 10 "sub-pages" that have been dynamically added. At what point does the DOM become too bloated so that performance is affected? What if I viewed 100 friends?

In order to manage that bloat, would it make sense to provide a an optional attribute called "data-cache-page" so that if set to false, once the page becomes inactive (i.e transitioned out of the viewport) it is removed from the dom?

Something like

Another example where I might not want a page to be cached is if the user looks at a friends profile in the morning and then returns to the profile at night. I would like for that user to see the non-cached version of that page/div.

Activity

trainiac

trainiac commented on Apr 19, 2011

@trainiac
Author

there was supposed to be an html example after "Something like..." but I see the html is stripped. Hopefully the preceding paragraph should suffice in illustrating my proposal.

toddparker

toddparker commented on Apr 28, 2011

@toddparker
Contributor

We agree that we need to manage memory and caching but we probably won't get a good solution together until after 1.0. I added this as a feature request under navigation here: https://github.com/jquery/jquery-mobile/wiki/Feature-Requests

trainiac

trainiac commented on Apr 28, 2011

@trainiac
Author

Great! After seeing this post https://developers.jivesoftware.com/community/blogs/engineering/2011/04/15/jivin-with-jquery-mobile-inter-page-navigation I also decided to just start configuring jquerymobile to handle some navigation issues as well.

Mark-H

Mark-H commented on May 11, 2011

@Mark-H

This is definitely something that needs to be worked on. I've been having this issue myself and have no idea how to prevent the page being "cached" without losing the back functionality & transitions.

EDIT: Just noticed #1554

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @trainiac@Mark-H@toddparker

        Issue actions

          option to cache or not cache a "sub-page" · Issue #1471 · jquery-archive/jquery-mobile