Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

206
Visualizações
How to get secure flag cookies in JavaScript console?

I wanted to get all the cookies from the current page including secure flag cookies. I know you can disable secure flag but I need to find a way to disable it with JavaScript or get them with JavaScript. They're not included in document.cookie.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You already can access cookies with the secure flag the same way you can access cookies without this flag. The only difference is, that cookies with the secure flag can't be accessed if you request a page via HTTP instead of HTTPS.

If you don't see them using document.cookie then you likely either didn't request the page via HTTPS, or the HttpOnly flag is also set. In both cases, it isn't possible to access these cookies through JavaScript. (Making them accessible anyway would somewhat defeat the purpose of those flags.)

(If the HttpOnly flag is not set and you do request the page via HTTPS, then the problem must be elsewhere, such as the current domain or path not matching the one specified on the cookie.)

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda