js如何让页面返回时跳过本页回到前一页

有个a.html页面,在a.html页面点击了b.html,然后又在b.html点击了 c.html
目的是想是在用户在c.html页面返回时,是返回到a.html,而不是b.html。

现在所用的代码是这样的,感觉这样不太好,不知道是否有更好的方法实现

if (window.performance.navigation.type == 2){
  window.history.go(-1);
}else{
   ...
}

可以b页面到c页面使用replace