Nicholas Wild
Nicholas Wild

Reputation: 629

How to use history pushstate

I used history.pushstate to modify the URL content, which was a better AJAX solution for me, when the task was completed, I got this method from here. Now, I want to clear the URL after certain task are completed. What am I supposed to do in order to clear the modified URL back into the original URL?

Upvotes: 1

Views: 2160

Answers (1)

Andrea Ligios
Andrea Ligios

Reputation: 50281

window.history.pushState("","", "heyIJustChangedMyUrlWithoutPosting");

Links (included SO threads and external articles) available here

Upvotes: 1

Related Questions