An HTTP cookie is a small piece of data sent from a server and stored on client-side by the browser itself, Cookies are made to keep track of user and also to provide one nice browsing experience. We can also set our on cookies in the browser according to our need.
Here we are using CDN of jQuery cookies to insert a cookie in the browser .
Note: Please keep your internet connection on while using this code as it uses CDN services for jQuery.
Example 1: Setting cookies in the browser after that we will remove that cookie.
Output: You can clearly see there is a cookie named GeeksforGeeks with a value. We can also set the cookie Expiry date.
- Before adding Cookie:
- After adding Cookies:
- After removing Cookie:
- ES6 | Cookies
- PHP | Cookies
- How cookies are used in a website?
- Express.js req.cookies Property
- How to set, get and clear cookies in AngularJs?
- How to get cookies from curl into a variable in PHP ?
- HTTP Cookies in Node.js
- If we delete cookies of a site, we can still logged in without logging again
- PHP | unset() Function
- CSS | unset keyword
- PHP | Unset() vs Unlink() Function
- PHP | Unset Session Variable
- Difference between revert and unset keyword in CSS
- PHP | Program to delete an element from array using unset() function
- jQuery | jQuery.fx.interval Property with example
- jQuery | jQuery.support Property
- jQuery | jquery Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.