projectblacklight / spotlight

Spotlight enables librarians, curators, and others who are responsible for digital collections to create attractive, feature-rich websites that highlight these collections.
Other
161 stars 64 forks source link

Search results cache issue is affecting site navigation #1620

Open caaster opened 8 years ago

caaster commented 8 years ago

User Hannah Frost reports:

"For this URL: https://exhibits.stanford.edu/shpc/catalog/qm871dx8736

When I click on "Search Results" in the breadcrumb trail above the sub-embed OR on "Back to Search" on this page, I do not go back to the previous page (expected behavior). I go back to the search results of an entirely different Spotlight exhibit that I was looking at yesterday.

I believe it is a cached search issue. I clicked on Memorial Arch image on home page, and it takes me to a page where I have Back to Search in my breadcrumbs. (When I open the SHPC exhibit in a new browser, one that I have not ever used for looking at Exhibits, I do not get any links on my Memorial Arch page that would indicate that I am in the middle of a search.) When I click on "back to search" or "search results", I go to a page in a different exhibit that I was looking at 2 days ago."

jkeck commented 7 years ago

I believe this is actually a well-known issue with the implementation of this feature in Blacklight (and not specific to Spotlight). You'll notice the same behavior in SearchWorks as well as other Blacklight sites that retain this feature.

If a user is navigating from a search result directly to a record, then the Back to Search link will return them to the context of the search that got them there (but technically, it's just the last search in the user's session).

So, if a user had another search as the last on their session, and then navigated to a record in another way (e.g. a direct link to the record) then the Back to Search link will return them to the context of their last search (which may be in another exhibit entirely).

I'm sure others might think of other potential solutions from the Spotlight side. These are the ones I can think of:

  1. Leave it as-is. It's behavior that exists in every Blacklight site.
  2. Remove the feature all-together.
  3. Override the feature to ensure that the link is only rendered when it will be in the same exhibit context.
    • Not sure how technically feasible this is, or if it's a good idea from a usability perspective.