Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8432763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:12:50+00:00 2026-06-10T06:12:50+00:00

if a domain foo.com has cookie bar=1 , cookie was placed when the domain

  • 0

if a domain foo.com has cookie bar=1, cookie was placed when the domain been visited as first party.
(so, the assumption is: the cookie is already there, not session cookie, not http-only, cookie under root”/“. This question is not about write cookie, it is about read.)

Also, the browser disabled the 3rd party cookie and no other plugins, just a clean installed browser with 3rd party disabled. No P3P header on foo.com as well.

Upon above condition, my questions are:

When page foo.com/somepage.html has been placed in an iframe under a different domain (third party)

  1. Will the browser send the cookie bar=1 to server when read the page?
  2. Can the JavaScript in the page read the cookie bar=1?
  3. Will I expect any browser difference on above two scenarios?

Additional Question

I do not need the answer because I do not use this scenario but curious to know.

Will the browser update the cookie (quite like write) under above condition if read is possible(, and old cookie is there, just need update (not a new write))?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:12:50+00:00Added an answer on June 10, 2026 at 6:12 am

    1.) Will the browser send the cookie bar=1 to server when read the page?

    Yes.

    2.) Can the JavaScript in the page read the cookie bar=1?

    That will depend on whether or not it is a session cookie (created with the HttpOnly flag). If it is a session cookie you cannot read it from javascrit. It will be sent to the server though on foo.com and a server side script will be able to read it.

    3.) Will I expect any browser difference on above two scenarios?

    No.

    Of course all of the above apply to the foo.com domain inside the iframe. The containing HTML page and server have 0 access to this cookie.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 different domain, let's call them www.foo.com and bar.foo.com. The first one
I have a domain foo.com on server bar. I have a subdomain api.foo.com which
I have a System.Uri, e.g., var uri = new Uri(http://www.domain.com/foo/bar); How do I get
I have two parts to a site, foo.domain.com and bar.domain.com (with bar.domain.com really being
If there is a cookie set for a subdomain, metric.foo.com, is there a way
is it possible to access cookie of a domain foo.com in another domain like
How can i turn http://domain.com/foo/bar.jpg into http://domain.com/bar while keeping the rest of the website
Say I have a www.foo.com domain which is setup to load my app on
I'm using @diegoperini's regex to validate URL's, However this: http://domain.com/#foo -> Matches http://domain.com#foo ->
Let's say I have myapp.appspot.com and two custom domains respectively called foo.com and bar.com

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.