Forums Forums Search & Filter Pro Browser Back Button Keeping Results

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #248661

    In thinking through a simple way to implement giving the user the ability to go back to their search results I figured that as long as the URL updated when they filtered something they could hit the back button in their browser and be taken back to those results.

    Well it kind of works. If you navigate to https://hc-companies.com/planter_category/round-containers/, select 8in and Co-Ex as your filters, click into a product, hit the back button in your browser — then you get these results.

    The URL is correct and holds your filters, the correct selections have been made in the form itself, but the results do not reflect the filters.

    Outside of building a custom solution to store these values, is there a way to trigger a refresh on the query itself when going back to properly apply the filters?

    Ross Moderator
    #248724

    Hi Richard

    We’ll be adding support for the back button (with updating the results as you go back through) – however it sounds like you are almost there.

    What I would probably do is add a “submit” to the form – $('.searchandfilter').submit()

    that would update the results via an Ajax call (if that is how your search form is setup) – I’m not sure, but I think if the URL stays the same, then ti might not add a entry to the browser history.

    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)