javascript - HttpOnly cookie - unable to set -


i trying make client receive page set required cookies after authentication, , go page after setting cookies.

client => server: credentials

server => client:

<html>     <body>         <script>             document.cookie="name=myname;path=/;secure;httponly";             document.cookie="token=abcdefg;path=/;secure;httponly";             window.location="https://localhost/mypage.html"         </script>     </body> </html> 

this fails when httponly set. how fix it?

httponly cannot set (or read) js - that's why it's called httponly.

so answering question:

how fix it?

you cannot "fix" - it's design. set server side.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -