简体   繁体   中英

Are PHP cookies and 'JS' cookies the same?

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?

A 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM