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

posted on 2017-12-02 22:55  _jackie  阅读(271)  评论(0编辑  收藏  举报

导航