Set-Cookie2

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

O obsoleto cabeçalho de resposta HTTP Set-Cookie2 usado para enviar cookies do servidor para o agente de usuário, mas ele foi depreciado por especificação. Use Set-Cookie ao invés disso.

Tipo de cabeçalho Response header
Forbidden header name não

Sintaxe

Set-Cookie2: <cookie-name>=<cookie-value> 
Set-Cookie2: <cookie-name>=<cookie-value>; Comment=<value>
Set-Cookie2: <cookie-name>=<cookie-value>; CommentURL=<http-url>
Set-Cookie2: <cookie-name>=<cookie-value>; Discard
Set-Cookie2: <cookie-name>=<cookie-value>; Domain=<domain-value>
Set-Cookie2: <cookie-name>=<cookie-value>; Max-Age=<non-zero-digit>
Set-Cookie2: <cookie-name>=<cookie-value>; Path=<path-value>
Set-Cookie2: <cookie-name>=<cookie-value>; Port=<port-number>
Set-Cookie2: <cookie-name>=<cookie-value>; Secure
Set-Cookie2: <cookie-name>=<cookie-value>; Version=<version-number>

// Múltiplas diretivas também são possíveis, por exemplo:
Set-Cookie2: <cookie-name>=<cookie-value>; Domain=<domain-value>; Secure

// Múltiplos cookies são separados por vírgula
Set-Cookie2: <cookie-name>=<cookie-value>, <cookie-name>=<cookie-value>, ...

Especificações

Especificação Título
RFC 2965: Set-Cookie2 Especificação histórica do Mecanismo de Gerenciamento de Estado do HTTP, obsoleto por RFC 6265 (Historic specification of HTTP State Management Mechanism, obsoleted by RFC 6265)

Compatibilidade de navegador

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Set-Cookie2
Deprecated
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

No support  
No support
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

Veja também