最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Are PHP cookies and 'JS' cookies the same? - Stack Overflow

programmeradmin3浏览0评论

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
Add a ment  | 

2 Answers 2

Reset to default 17

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.

发布评论

评论列表(0)

  1. 暂无评论