"addFacetRefinement" breaks when clicking browser back button

This might be a weird edge case, but wanted to see if anyone has run into this issue before.

When I follow these steps:

  1. navigate to a page that has a addFacetRefinement being applied to filter down the visible products (example: https://antibodies.myshopify.com/pages/neuronal-glial-markers with 39 results)
  2. click on a facet (example: applications:ICC with 36 results shown)
  3. hit the back button in the browser (then it removed the facet refinement and shows all 615 products).

Any ideas?

(password: xenopus)

Since the parameters from the path are not handled by the routing system in InstantSearch.js you need to find a way to keep those parameters. Actually, you already came up with a solution using the searchfunction. You will have to do the same here.

Can you share with us the code you used to assign this specific filter?

I believe I’ve already had this issue when using a widget’s init function to add my filter and had to move it to the searchFunction for it to work.