express 重新加载

1,res.location()

2. res.redirect()

location()redirect()的比较:

Expressresponse对象,是对Node.js原生对象ServerResponse的扩展。location()方法只会设置Location头,而redirect()方法除了会设置Location头外还可自动或手头设置HTTP状态码。理论上讲两者可以实现重定向。

https://itbilu.com/nodejs/npm/EJD5cyg3l.html#redirect

原文地址:https://www.cnblogs.com/aiyr/p/7956085.html