Answer the question
In order to leave comments, you need to log in
Is it possible purely in PHP to find out if cookies are enabled without reloading the page?
Hi
Chet I don't get it.
Situation: a person opened the site page for the first time. Is there any way to know if his browser supports cookies without reloading the page and JS/Ajax? If possible, please provide an example.
Answer the question
In order to leave comments, you need to log in
It is forbidden.
You can only get the passed headers by the browser.
But it won't mean anything.
You can try to prevent him from opening the page for the first time. Those. if there are no cookies at all - issue an empty page setting cookies with a refresh.
But in this case, a person with disabled cookies will not see your site at all, but will receive an eternal redirect.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question