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 283179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:21:05+00:00 2026-05-12T05:21:05+00:00

I am observing, on both Firefox and IE, that if I have a cookie

  • 0

I am observing, on both Firefox and IE, that if I have a cookie ‘x’ on the domain a.b.c.com, and also have a cookie with the same name ‘x’ on domain a.b.com, then when I look at the value of document.cookie on the a.b.c.com domain, it shows both cookies. I would like to see just the cookie from the a.b.c.com domain, and not the one from the other domain. (I’m assuming this occurs because one domain is the same as the other one, with an additional segment on the hostname.) Is there a way to do this?

I don’t have control over the contents of the cookie, and I don’t see anything obvious in those contents that distinguishes one domain from the other.

  • 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-05-12T05:21:06+00:00Added an answer on May 12, 2026 at 5:21 am

    You don’t have access to the domain of the cookie in Javascript.

    "When [the cookie] attribute is read, all
    cookies are returned as a single
    string, with each cookie’s name-value
    pair concatenated into a list of
    name-value pairs, each list item being
    separated by a ‘;’ (semicolon)."
    W3C

    When you read a cookie, you only have access to the name/value pairs, and cannot determine any other information about it. If you require things such as when it was set, what domains it was set for, or anything else, you have to store it inside the cookie value.

    Since you cannot set the cookies, you need another method to do what you’re attempting.

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

Sidebar

Related Questions

I am observing a weird behavior in Firefox. I have a sub-nav menu item
I'am using key-value observing. I have object_1 (NSManagedObject) and few other objects-observers. When I
We are observing 4-6 threads on Windows 7 x64 in the application which have
I'm using key value observing on a boolean property an NSObject method: -(void)observeValueForKeyPath:(NSString *)keyPath
Hi I am writing a program that is dependent on time and observing some
I am observing a different output from a C++ compiled binary file, that calls
I have an EBNF grammar that has a few rules with this pattern: sequence
I have the following setup: A subclass of UISplitViewController that creates the master and
We have recently compared the respective file sizes of the same tabular data (think
I have outbound links like this in my html: <a href=http://www.example.com class=gaLink1 target=_blank onCLick=ga_track_link('action',

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.