Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider replacing track_url/session mechanism for previous/next docs with window.sessionStorage #2558

Open
barmintor opened this issue Nov 24, 2021 · 0 comments · May be fixed by #2954
Open

Comments

@barmintor
Copy link
Contributor

barmintor commented Nov 24, 2021

The track_url/search session mechanism in Blacklight supports two related but distinct features in Blacklight:

  1. Previous/next/back to search navigation in the show view
  2. Search history tracking

At the cost of constraining browsing a given search to the tab the search was executed in, the previous/next behavior could be rewritten to use window.sessionStorage and a "window" of offsets into the result set. This would simplify the Blacklight back-end and routing, and eliminate POST/redirect cycles from viewing a result document.

If this entirely replaced the track_url/session mechanism, there would be a legacy data issue and possibly a neglected use case. There is a parallel suggestion to use the ping attribute to replace the existing track mechanism; this could be approached as a complementary change - using sessionStorage to track the search, fetching JSON to populate pagination widgets in the show view, and explicitly configuring a tracking mechanism via the ping attribute if the installation wants to support stored search history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant