JavaScript History

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • window.history.pushState(domain, title, path);
  • window.history.replaceState(domain, title, path);

Parameters

ParameterDetails
domainThe domain you want to update to
titleThe title to update to
pathThe path to update to

Remarks

The HTML5 History API is not implemented by all browsers and implementations tend to differ between browser vendors. It is currently supported by the following browsers:

  • Firefox 4+
  • Google Chrome
  • Internet Explorer 10+
  • Safari 5+
  • iOS 4

If you want to find out more about the History API implementations and methods, please refer to the state of the HTML5 History API.



Got any JavaScript Question?