If i set a cookie in PHP with the setcookie() function, can i access that with javascript cookie api, in other words are the php and javascript cookie access interchangeable?
If i set a cookie in PHP with the setcookie() function, can i access that with javascript cookie api, in other words are the php and javascript cookie access interchangeable?
Share Improve this question asked May 23, 2011 at 19:32 Adam CarterAdam Carter 4,8445 gold badges44 silver badges109 bronze badges 1- Question 256325 has another good answer to this question. – johnreed81 Commented Apr 16, 2012 at 0:58
2 Answers
Reset to default 17A cookie is a cookie, unless it is specified to be HTTP only.
Cookies are entirely independent of PHP and Javascript; they're just a client-side storage mechanism. So yes.