What is Cookies?

Home Forums Java Script What is Cookies?

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Sushmita Ghosh 3 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1401

    Divya
    Participant

    What Are JavaScript Cookies?

    #1402

    Sushmita Ghosh
    Keymaster

    A cookie is a piece of data which is sent from a website (that owns the requested web page) and gets stored locally by the browser at the user end. Cookies are needed because HTTP protocol which arranges for the transfer of web pages to your browser, is stateless. It means that HTTP has no way to keep track of the activities performed by the user at an earlier point in time. One way to resolve this issue is by using cookies. It contains following data.

    A name-value pair containing the actual data.
    An expiry date after which the cookie is no longer valid.
    The domain and path of the server it should be sent to.
    When a request arrives at the server for a web page that maintains a cookie, the server appends the cookie to the HTTP header to send it across. Server side programs can then read out the information included in it and decide that you have the right to view the page or not and other user preferences.

    Thus, every time you visit the site that maintains the cookies, your information is available there.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Pasham Technology © 2018 Pasham Technologies