Article

Get the user cookie, modify its age.

https://cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js
Copy to clipboard

Suppose we want to modify the "age" value in the user cookie, we would accomplish this by writing: https://raw.githubusercontent.com/finsweet/jqueryCourse/main/cookies/ex13.js?actionable=true In the above example the user_cookie variable is an object and thus we can modify the age key before setting the cookie with the new modified object

<script>
$(document).ready(function(){
  XT1
});
</script>
Copy to clipboard
Send to Live Demo

Live demo

<script>    
$(document).ready(function() {
  XT1
});
</script>
<script>
  
</script>
Copy to clipboard
Press the Run Demo button to execute the scripts above.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Your browser is too small

Resize your browser to be at least 769px wide.