history.js
function changeState(state, url, replace, lastURLValue) {
    if (!isSupportHistoryAPI) {
      // if not used implementation history.location
      if (isUsedHistoryLocationFlag === 0) isUsedHistoryLocationFlag = 2;
      // normalization url
      var urlObject = parseURL(url, isUsedHistoryLocationFlag === 2 && ('' + url).indexOf("#") !== -1);
      // if current url not equal new url
      if (urlObject._relative !== parseURL()._relative) {
        // if empty lastURLValue to skip hash change event
        lastURL = lastURLValue;
        if (replace) {
          // only replace hash, not store to history
          windowLocation.replace("#" + urlObject._special);
        } else {
          // change hash and add new record to history
          windowLocation.hash = urlObject._special;
        }
      }
    } else {
      lastURL = windowLocation.href;
    }
    if (!isSupportStateObjectInHistory && state) {
      stateStorage[windowLocation.href] = state;
    }
    isFireInitialState = false;
  }
function changeState(state, url, replace, lastURLValue) {
    if (!isSupportHistoryAPI) {
      // if not used implementation history.location
      if (isUsedHistoryLocationFlag === 0) isUsedHistoryLocationFlag = 2;
      // normalization url
      var urlObject = parseURL(url, isUsedHistoryLocationFlag === 2 && ('' + url).indexOf("#") !== -1);
      // if current url not equal new url
      if (urlObject._relative !== parseURL()._relative) {
        // if empty lastURLValue to skip hash change event
        lastURL = lastURLValue;
        if (replace) {
          // only replace hash, not store to history
          windowLocation.replace("#" + urlObject._special);
        } else {
          // change hash and add new record to history
          windowLocation.hash = urlObject._special;
        }
      }
    } else {
      lastURL = windowLocation.href;
    }
    if (!isSupportStateObjectInHistory && state) {
      stateStorage[windowLocation.href] = state;
    }
    isFireInitialState = false;
  }
function changeState ( state , url , replace , lastURLValue ) { if ( ! isSupportHistoryAPI ) { // if not used implementation history.location if ( isUsedHistoryLocationFlag === 0 ) isUsedHistoryLocationFlag = 2 ; // normalization url var urlObject = parseURL ( url , isUsedHistoryLocationFlag === 2 && ( '' + url ) . indexOf ( "#" ) !== - 1 ) ; // if current url not equal new url if ( urlObject . _relative !== parseURL ( ) . _relative ) { // if empty lastURLValue to skip hash change event lastURL = lastURLValue ; if ( replace ) { // only replace hash, not store to history windowLocation . replace ( "#" + urlObject . _special ) ; } else { // change hash and add new record to history windowLocation . hash = urlObject . _special ; } } } else { lastURL = windowLocation . href ; } if ( ! isSupportStateObjectInHistory && state ) { stateStorage [ windowLocation . href ] = state ; } isFireInitialState = false ; }
Change the data of the current history for HTML4 browsers

@param {Object} state
@param {string} [url]
@param {Boolean} [replace]
@param {string} [lastURLValue]
@return void
Change the data of the current history for HTML4 browsers