Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Update and delete cookies
Play lesson

JavaScript Tutorial - Update and delete cookies

4.0 (0)
13 learners

What you'll learn

This course includes

  • 12.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2015/02/update-and-delete-cookies.html Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help. https://www.youtube.com/channel/UC7sEwIXM_YfAMyonQCrGfWA/?sub_confirmation=1 In this video we will discuss 1. Updating a cookie 2. Deleting a cookie 3. Cookie limitations Updating a cookie : To update a cookie, set a cookie with the same name again. The following code updates the color cookie with the New_Color if a cookie with name=color exists otherwise it creates a new cookie with that name. document.cookie = "color=New_Color"; Deleting a cookie : To delete a cookie, set a cookie with max-age attribute set to a negative value document.cookie = "color=red;max-age=-60"; If you are using a browser that supports expires attribute, then set the expires attribute to a date in the past. document.cookie = "color=red;expires=Mon, 01 Jan 1900 01:00:00 UTC;"; Please note: Users can also use the browser interface to delete cookies anytime they want. Cookie limitations : 1. What is the maximum allowed cookie size per cookie 2. How many cookies are allowed per domain The answers to these questions really depend on the browser you are using. The following website can be used to find out what the limits are http://browsercookielimits.squawky.net

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere