code: function getPageRefreshed() {
    try {
      if (performance && performance.navigation) {
        return performance.navigation.type === performance.navigation.TYPE_RELOAD;
      }
    } catch (e) { }
    return false;
  }
docs: /* Get information on page refresh