{"id":668,"date":"2012-11-22T10:03:04","date_gmt":"2012-11-22T10:03:04","guid":{"rendered":"http:\/\/codeatelier.wordpress.com\/?p=384"},"modified":"2012-11-22T10:03:04","modified_gmt":"2012-11-22T10:03:04","slug":"difference-between-php-and-javascript-cookies","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/difference-between-php-and-javascript-cookies\/","title":{"rendered":"Difference between php and javascript cookies"},"content":{"rendered":"<p>HTTP Cookies are not a feature of PHP, nor a feature of Javascript : those are just programming languages that allow a developper to manipulate them.<\/p>\n<p>The biggest difference between JS and PHP is that :<\/p>\n<p>    Javascript runs on the client side<br \/>\n    PHP runs on the server side<\/p>\n<p>But cookies are still the same : they are defined as a standard &#8212; see RFC 2965.<\/p>\n<p>Still, note that modern browsers implement cookies that are not accessible from Javascript (see the httponly option of setcookie) &#8212; which means that, depending on the browser, and the way a cookie was set, it might not be accessible from Javascript.<\/p>\n<p>This is a security measure &#8212; and is not a difference between &#8220;js cookies&#8221; and &#8220;php cookies&#8221; : it&#8217;s just a property of some cookies.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HTTP Cookies are not a feature of PHP, nor a feature of Javascript : those are just programming languages that allow a developper to manipulate them. The biggest difference between JS and PHP is that : Javascript runs on the client side PHP runs on the server side But cookies are still the same :&hellip; <a href=\"https:\/\/codethataint.com\/blog\/difference-between-php-and-javascript-cookies\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-668","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=668"}],"version-history":[{"count":0,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/668\/revisions"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}