Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How browser resolves the cookies

How browser resolves the cookies

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vivek Sivasamy
    wrote on last edited by
    #1

    Hi, Iam basically from C# background and very new to ASP.Net. I was trying to understand Cookie management in ASP.Net. I have a doubt in this regard. How will the client(the web browser) maintains so many cookies and how exactly it resolves the appropriate cookie to be sent along with the request message? Thanks in advance Vivek

    G 1 Reply Last reply
    0
    • V Vivek Sivasamy

      Hi, Iam basically from C# background and very new to ASP.Net. I was trying to understand Cookie management in ASP.Net. I have a doubt in this regard. How will the client(the web browser) maintains so many cookies and how exactly it resolves the appropriate cookie to be sent along with the request message? Thanks in advance Vivek

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      The cookies are maintained separately for each domain name. The browser will send back all the cookies for the domain name in each request to the server. As all the cookies are sent every time, you should of course keep them at a minimum. The browser also has a limit on the total size of the cookies per domain name, and different browsers have different limits. A typical value for the limit is 4 kb, but it may be more or less. If you are in danger of reaching the limit, you are of course using way too many cookies.

      --- b { font-weight: normal; }

      V 1 Reply Last reply
      0
      • G Guffa

        The cookies are maintained separately for each domain name. The browser will send back all the cookies for the domain name in each request to the server. As all the cookies are sent every time, you should of course keep them at a minimum. The browser also has a limit on the total size of the cookies per domain name, and different browsers have different limits. A typical value for the limit is 4 kb, but it may be more or less. If you are in danger of reaching the limit, you are of course using way too many cookies.

        --- b { font-weight: normal; }

        V Offline
        V Offline
        Vivek Sivasamy
        wrote on last edited by
        #3

        Thanks for the reply. But this raises another question.If i have 2 instance of the web application running on my system,then will the cookies of one instance be over written by the cookies of another instance? If no, how exactly will the browser resolve the cookie associated with the webpage. Thanks

        G 1 Reply Last reply
        0
        • V Vivek Sivasamy

          Thanks for the reply. But this raises another question.If i have 2 instance of the web application running on my system,then will the cookies of one instance be over written by the cookies of another instance? If no, how exactly will the browser resolve the cookie associated with the webpage. Thanks

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          If you have two web applications on your system, they will have different domain names, or you can't reach them individually. If you for an example use the built-in server in Visual Studio, it will use different port numbers for the instances, so localhost:6474 and localhost:3466 will be separate domain names.

          --- b { font-weight: normal; }

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups