Answer the question
In order to leave comments, you need to log in
Why are cookies still available in JS?
I'm trying to disable cookies via JS.
To do this, I wrote in .htaccess :
php_value session.cookie_httponly 1
But when you enter this line in JS, cookies are displayed in the console.
An attempt to disable the use of cookies in JS through PHP by writing such a line was also unsuccessful, they are still displayed in the console. How to disable cookies in JS?
console.log(document.cookie);
ini_set('session.cookie_httponly', 1);
Answer the question
In order to leave comments, you need to log in
At least once! Look here .
php_value session.cookie_httponly 1
php_value session.cookie_secure 1
1. Clear all browser cookies for the test domain and test again after requesting a page. Header always edit Set-Cookie (.*) "$1; HTTPOnly"
Header always edit Set-Cookie (.*) "$1; HTTPOnly; Secure"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question