I am using history.pushState to manipulate the browser history, Is there a way to undo/pop a particular pushed state.
Let's say I came from google.com to myPage.com. After an ajax call I do pushState,
window.history.pushState({}, "SUMMARY", "/summary.html");
Now after some more ajax calls, Is there a way to delete the earlier pushed state so the back button takes me to google.com instead of myPage.com
Edit: After the first ajax call I am pushing the state so i can go back earlier state, but I want to remove this functionality if another ajax call is made .