I have a couple of websites that have some sort of javascript filtering (checkboxes,radio, etc) and that works well, however want to implement navigation (next and previous) on clicked element but based on the selected filters previously.
Example:
I have selected the sector filer that is “Industrial” and the year filter that is “2020” and now when I click on any of these items listed in the grid i am taken to a new page (the browser will refresh) and want to be able to navigate on “sibling resources” through next and prev but based on sector and year filter clicked step before.
I guess will need store these filters somewhere like cookies or something but in my case i cant use cookies . Does anybody know good alternative or had similar issue?
Thank you for your response.
Also forgot to mention that i cant add extra parameters to URL (trying to keep links nice a tidy for SEO)
Could you please say a bit more about $_SESSION option?
If you don’t have any cookies (even the session cookie), then there is no way on the server to determine, if the user that requests a page already made a previous request.
You can’t use $_SESSION and you have to provide all necessary information as request parameters (so that the server knows what to do).
Maybe you could instead use AJAX-requests to load/show the clicked item.
(But you probably still need to add parameters for the filters to the AJAX-request.)
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.