# document.cookie not accessible but httponly of set-cookie response from django server is false.

**URL:** <https://forum.djangoproject.com/t/document-cookie-not-accessible-but-httponly-of-set-cookie-response-from-django-server-is-false/32253>\
**Category:** Mystery Errors\
**Created:** [June 19, 2024, 7:17pm UTC](https://forum.djangoproject.com/t/document-cookie-not-accessible-but-httponly-of-set-cookie-response-from-django-server-is-false/32253 "2024-06-19T19:17:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![suyashpriyadarshi7](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/suyashpriyadarshi7/32/22041_2.png) [@suyashpriyadarshi7](https://forum.djangoproject.com/u/suyashpriyadarshi7)\
**Post date:** [June 19, 2024, 7:17pm UTC](https://forum.djangoproject.com/t/document-cookie-not-accessible-but-httponly-of-set-cookie-response-from-django-server-is-false/32253/1 "2024-06-19T19:17:32Z")

</div>

![Screenshot 2024-06-20 001458](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/2/a/2a8e1b7d7fbfc4da8b9e380475d3b3f97f767b99.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/4/d/4d90811ac65be52cdeedd09c851102392f3f1934.png)

The first image is the network developer option which shows that csrf cookie is available in response set-cookie header with no hhtponly flag. request header also contain some csrf cookie. also sessionid is available in response header set-cookie.

The second image shows `document.cookie` is an empty string.  
Pls help me out.

Extra info: backend built using django and djangorestapi, live running with https. frontend with react live on `somedomain.vercel.app` with https.

Thanks in advance.
