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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:39:49+00:00 2026-05-27T08:39:49+00:00

I know that when cookies get sent from server to browser with a server

  • 0

I know that when cookies get sent from server to browser with a server language setting them, it happens through http or ssl or https. So where does a javascript cookie go, once the script: “document.cookie=”, is executed in the browser, and through which protocol/transmission scheme?

  • 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-27T08:39:50+00:00Added an answer on May 27, 2026 at 8:39 am

    A browser simply sends all unexpire HTTP cookies (not SSL related!) in its “cookie jar” which match the domain (and possibly path) of the outgoing HTTP request: once in the “cookie jar”, the cookie is sent automatically for all future requests. Cookies sent from the server via the Set-Cookie header are automatically added to the “cookie jar”, but, as noted, cookies can also be added from JavaScript*. In both cases the client/browser sends the cookie back to the server via the Cookie header.

    This is why, like all user input, cookies should be treated with caution and must be backed/verified on each request for “security-sensitive” operations. Generally a session cookie is used that provides this protection by being a form of a nonce as they are (or should be) large cryptographically-sound random numbers that are never reused and are impossible predict.

    The session cookie/nonce is then just a look-up into a persistent store (usually database) containing state such as the “user ID”. It is a combination of the separation and nonce characteristics which prevents clients from choosing their own “user ID” based just on the value of a cookie, but…

    …”security” is a complex topic, and session cookies do not prevent against all malicious JavaScript, such as that which employs CSRF or similar, and they offer no help against man-in-the-middle attacks or eavesdropping, and are only effective against replay attacks insofar as their expiration time. Another (often overlooked) approach to verify a cookie is to use a tamper-proof verification hash, such as what ASP.NET does with view state.

    A server program that blindly used/trusted LoggedInUserId or IsAdministrator cookies would be very insecurely designed indeed! 🙂

    Happy coding.


    *All of the most recent browsers support HTTPOnly cookies, which cannot be read/overwritten by JavaScript: they can still be spoofed by other programs, however! (Some browsers only gained support as of late: e.g. Chrome 12, iOS4, Safari 5.)

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

Sidebar

Related Questions

I know from this question that Firefox 3.0 and up stores its cookies in
Is there a way except cookies/sessions(user can clear them) which allow HTTP server to
I have a GAE app that works just fine from my browser, but can't
I know that I can set expiration date for a cookie, but can I
Due to weird domain/subdomain cookie issues that I'm getting, I'd like to know how
I know that I can do something like $int = (int)99; //(int) has a
I know that default cron's behavior is to send normal and error output to
I know that you can insert multiple rows at once, is there a way
I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is
I know that the MsNLB can be configured to user mulitcast with IGMP. However,

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.