原文 https://www.jianshu.com/p/4fcb4b411a66 额外补充说明的,在当今的前端框架中,几乎都已经做到了对反射型 XSS 的防范 对于防止 cookie 劫持,可以在 HTTP 头 set cookie: name=value; HttpOnly