I have array of states and index of the array in history.state and on popstate I read the content of the array, it work fine but when I go back to first page and refresh the array is gone (which is normal) but forward history state remain.
Is it possilbe to remove fake history that was created using pushState?
I can't store my state in localStorage because I have functions in my state array.