What is Cookies All about HTTP(Part 2)

HTTP Cookies

HTTP cookies are known as a web cookie, Internet cookies, browser cookies. in the cookie, we can store a small piece of data that server send to your browser.

Cookies are useful for Auth cookie tokens, to store in small text fi…


This content originally appeared on DEV Community and was authored by Nikhil Bobade

HTTP Cookies

HTTP cookies are known as a web cookie, Internet cookies, browser cookies. in the cookie, we can store a small piece of data that server send to your browser.

Cookies are useful for Auth cookie tokens, to store in small text files, user preferences, color themes, game scores for many things you can use HTTP cookies. Its very easy to create cookies and delete cookies with JavaScript, PHP, NodeJS & Python etc.

In cookies, we have many options like Expires, Domain, Path, Secure, Name they are used when we create a cookie or read a cookie.

1.Expire: we can use it to set the date the cookie will expire.
2.Secure: a browser only use HTTP.
3.Domain: The domain name of your site.
4.Path: The path to the directory or web page that set the cookie.

How to set cookies with JS?

Alt Text

For NodeJS, you need to require HTTP in your code and directly use cookies.

If you find this useful in a post like and save this post also comments about your thoughts. For more content follow me on Instagram @developer_nikhil27.


This content originally appeared on DEV Community and was authored by Nikhil Bobade


Print Share Comment Cite Upload Translate Updates
APA

Nikhil Bobade | Sciencx (2021-05-28T14:14:19+00:00) What is Cookies All about HTTP(Part 2). Retrieved from https://www.scien.cx/2021/05/28/what-is-cookies-all-about-httppart-2/

MLA
" » What is Cookies All about HTTP(Part 2)." Nikhil Bobade | Sciencx - Friday May 28, 2021, https://www.scien.cx/2021/05/28/what-is-cookies-all-about-httppart-2/
HARVARD
Nikhil Bobade | Sciencx Friday May 28, 2021 » What is Cookies All about HTTP(Part 2)., viewed ,<https://www.scien.cx/2021/05/28/what-is-cookies-all-about-httppart-2/>
VANCOUVER
Nikhil Bobade | Sciencx - » What is Cookies All about HTTP(Part 2). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/05/28/what-is-cookies-all-about-httppart-2/
CHICAGO
" » What is Cookies All about HTTP(Part 2)." Nikhil Bobade | Sciencx - Accessed . https://www.scien.cx/2021/05/28/what-is-cookies-all-about-httppart-2/
IEEE
" » What is Cookies All about HTTP(Part 2)." Nikhil Bobade | Sciencx [Online]. Available: https://www.scien.cx/2021/05/28/what-is-cookies-all-about-httppart-2/. [Accessed: ]
rf:citation
» What is Cookies All about HTTP(Part 2) | Nikhil Bobade | Sciencx | https://www.scien.cx/2021/05/28/what-is-cookies-all-about-httppart-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.