node.js - expressr获取不到cookie的expires信息,如何获取cookie的expires信息
PHPz
PHPz 2017-04-17 14:59:42
0
1
726

前提是子站服务器端使用express搭建,浏览器端存有主站的cookie信息。访问子站时,子站服务器端能够获取到cookie的key=value信息,但是获取不到cookie的expires或者max-age信息。
在主站的java服务器上可以获取cookie全部信息,所以比较疑惑,在express上如何获取cookie的全部信息?

PHPz
PHPz

学习是最好的投资!

reply all(1)
洪涛

How do you get it on the Java main site? It is not possible. The http protocol will only send key-value pair information without expired cookies. Other messages will not be sent back. In Java's servlet api, Cookie.getMaxAge always returns -1. The same goes for the others. This is determined by the http protocol itself and has nothing to do with any framework or language.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template