You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change internal cache struct to fix restoring mixed containers
When different pjax containers were used for pjax navigations, the
popstate restoring mechanism would get confused as to in which container
to restore some particular HTML. I tried to remedy this by reading the
target container from `previousState` on "back" navigations, however
this was subject to at least a couple of flaws:
1. It would break if `previousState` was done via replaceState, which
replaces content in a container but doesn't add a history entry.
2. It doesn't handle the case where user jumps several steps of history
stack (e.g. by holding the "Back" button pressed and choosing from the
drop down menu).
A more solid solution to knowing where to restore particular cached HTML
is to save the information about the container that the HTML was saved
from in the first place. This adds the container selector information to
the cache, forming a pair with cached contents for each history entry.
0 commit comments