📜  如何在 javascript 代码示例中获取 httponly cookie

📅  最后修改于: 2022-03-11 15:03:53.094000             🧑  作者: Mango

代码示例1
The whole point of HttpOnly cookies is that they can't be accessed by JavaScript.

The only way (except for exploiting browser bugs) for your script to read them 
is to have a cooperating script on the server that will read the cookie value
and echo it back as part of the response content. But if you can and would do
  that, why use HttpOnly cookies in the first place?