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.

Implement a global system to control DOM size #1555

@toddparker

Description

@toddparker

Memory management: how to keep the DOM from getting too big?

A new global configuration option to set the max number of pages to keep in the DOM at once. Once that max is hit, we run a a document-wide $("selector").remove() at the appropriate juncture in every changePage invocation (post Ajax success) that finds all pages that are data-cache="false" or oldest in the stack and delete them. We’ll need to check for alreadyLocalPage = ("[data-url='...']:not([data-cache='false']")

Default to a sensible number like 15-20 pages but this can be overridden to any number more than 2 (to allow for transitions) or turned off completely

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions