Unicode Cookie Value

后端 未结 3 730
逝去的感伤
逝去的感伤 2021-01-24 02:09

I am about to start to make a cookie with Unicode value (Japanese characters) is there any problem with Unicode Cookie value? in IE 7 IE 8 Firefox, Safari, Chrome?

Thank

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-24 02:17

    Technically speaking, the content of the cookie value is opaque and can be anything the server wants, even binary data, as long as the resulting HTTP headers follow the rules of the HTTP specifications. By convention, most servers encode non-ASCII data, typically with URL-encoding (a non-ASCII byte is represented as "%XX", where XX is the hex value of the byte).

提交回复
热议问题