[英]Does a cookie have to be set in the http header?
Would like to set cookies from the server (CGI - C) 想要从服务器(CGI-C)设置cookie
Can it be set after the header has been printed? 可以在打印标题后进行设置吗?
Thanks. 谢谢。
You can set cookies using JavaScript embedded in an HTML document, or via a few other mechanisms, such as Flash. 您可以使用嵌入HTML文档中的JavaScript或通过其他一些机制(例如Flash)来设置Cookie。
Other than that though, the header is the only place in HTTP you can set them. 除此之外,标头是HTTP中唯一可以设置的地方。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.