/chrome/community?hl=en
This content is likely not relevant anymore. Try searching or browse recent questions.
document.cookie is not working with iframe, Windows 10, Chrome 80.0.3987.132 1 Recommended Answer 13 Replies 50 Upvotes
1 Update
$0 Updates
1 Recommended Answer
$0 Recommended Answers
1 Relevant Answer
$0 Relevant Answers
1
Setting up cookie using document.cookie is working normally. But, if we have the same page inside an iframe it is not working - facing this issue recently, not sure this is because of some updates in recent Chrome. 

To check the same, we can try example 1 code from this page: https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie
If we click the Show cookies button, getting an empty alert.
But, if we open the page which is in iframe () we are getting expected result.

Is this expected? document.cookie behavior is changed recently? Then, how we can set cookie using JS if the page is inside an iframe?

Any idea?
(Checked the same in EDGE browser, it works as expected)

If the page is in iframe


If we directly access the page:


in EDGE, it works as before
Relevant Answer Relevant Answers (0)
All Replies (13)
Relevant Answer
The issue is with Chromium.
When we test this with Chromium version 80.0.4087.0 - this happens.
But with 80.0.3987.122, it works normally.
marked this as an answer
Relevant Answer
we have the same issue ... I'm just tired of Chrome
marked this as an answer
Relevant Answer
Same error version: 80.0.3987.149 (Compilação oficial) (64 bits)
marked this as an answer
Relevant Answer
marked this as an answer
This question is locked and replying has been disabled.
Discard post? You will lose what you have written so far.
Write a reply
10 characters required
Failed to attach file, click here to try again.
Discard post?
You will lose what you have written so far.
Personal information found

We found the following personal information in your message:

This information will be visible to anyone who visits or subscribes to notifications for this post. Are you sure you want to continue?

A problem occurred. Please try again.
Create Reply
Edit Reply
Delete post?
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.
Report abuse
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
Report post
What type of post are you reporting?
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
This reply is no longer available.
/chrome/threads
//accounts.google.com/ServiceLogin
You'll receive email notifications for new posts at
Unable to delete question.
Unable to update vote.
Unable to update subscription.
You have been unsubscribed
Deleted
Unable to delete reply.
Removed from Answers
Removed from Updates
Marked as Recommended Answer
Marked as Update
Removed recommendation
Undo
Unable to update reply.
Unable to update vote.
Thank you. Your response was recorded.
Unable to undo vote.
Thank you. This reply will now display in the answers section.
Link copied
Locked
Unlocked
Unable to lock
Unable to unlock
Pinned
Unpinned
Unable to pin
Unable to unpin
Marked
Unmarked
Unable to mark
Reported as off topic
Known Issue
Fixed
Marked Fixed
Unmarked Fixed
Unable to mark fixed
Unable to unmark fixed
/chrome/profile/0