node.js中如何向客户端发送COOKIE呢?有如下两个方案: 一.使用response.writeHead,代码示例: //设置过期时间为一分钟 var today = new Date(); var time = today.getTime() + 60*1000; var time2 = new Date(time); var timeObj = time2.toGMTString(); response.writeHead({ 'Set-Cookie':'myCookie="type=…