am having few check boxes on my web page and related data (few products) according to the selection of check boxes and basically products data is result of ajax call from these check boxes and i am changing the url of browser by attaching query string params using window.history.pushState. it's working fine but the problem is when i tried clicking back / front button of browser. selection of check boxes still showing latest selected ones not the previous selection
state-1: First selection url:http://localhost:1234/Brands?Color=Peach and corresponding filter img below
state-2: Second selection url:http://localhost:1234/Brands?Color=Peach%2CPink%2FWhite and corresponding filter img below
now when i click browser back button i am getting url changes to state 1 but my filter selection is remain same like
state-3: (back button click on browser) url:http://localhost:1234/Brands?Color=Peach
how to get the previous state, again i need to find all query params in url and do uncheck operation or else any way is there is to do it ??