Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

205
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!