Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

replaceState

The replaceState() method of the History object updates the state object for the current history entry and can optionally change the url address bar.

Syntaxhistory.replaceState( data, title, url )

Parameters

same as the pushState() method

Examples

var data = { data1:"abc", data2:"def", data3:"ghi" }; history.pushState(data, "short title", "?id=1"); var data = { data1:"jkl", data2:"mno", data3:"pqr" }; history.replaceState(data, "short title", "?id=1");

JavaScript

Methods

addEventListeneralertaveragebackblurconcatcreatedecodeURIdecodeURIComponentencodeURIencodeURIComponentevaleveryfilterforwardgoisArrayisFiniteisNaNjoinparseFloatparseIntpoppushpushStatereducereplaceStatereverseshiftshuffleslicesomesortspliceunshiftwrite