Project

General

Profile

Actions

Bug #3634

closed

[Workbench] Page content is the same as where you left it when navigating (back) to it with browser history

Added by Tom Clegg over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Phil Hodgson
Category:
-
Target version:
Story points:
1.0

Description

Page content can be updated by Javascript and AJAX, but if it is, and one navigates away, and then uses the browser back button (or history) to return to the page, the user will see the initial content of the page (as it was previous to the JS and AJAX changes) rather than the most recent content of the page.

HTML5 allows us to store state in the browser's history stack.
  • Use replaceState() when changing page/tab content.
  • When switching tabs, use pushState() or replaceState() and store "which is the current tab" in the history data.
  • Listen to popstate events. Copy latest page content from the history data to the DOM.

Workbench already loads History.js, which offers compatibility with HTML4 browsers. https://github.com/browserstate/history.js


Subtasks 3 (0 open3 closed)

Task #3881: Review 3634-tab-stateResolvedPhil Hodgson09/16/2014Actions
Task #4080: Deliver all pages with an expired cacheResolvedPhil Hodgson09/16/2014Actions
Task #3880: Remember active tab panel on browser back navigationResolvedPhil Hodgson09/16/2014Actions
Actions

Also available in: Atom PDF