前端使用ajax请求地址后,设置session后,返回给前端,前端通过location.href="xxxx",出现 Status Code: 301 Moved Permanently (from disk cache) ,状态码是 301 Moved Permanently (from disk cache)
,301是永久重定向,但后面的描述似乎说明被重定向到了缓存???但是不需要重定向到缓存
解决方法:前端location.href="xxxx?rand="+Math.random(),在跳转地址上带上随机参数即可解决,原理是每次跳转都需要刷新缓存
gin Status Code: 301 Moved Permanently (from disk cache)
原文:https://www.cnblogs.com/flyfly123/p/13041035.html