Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to set/get cookie in JavaScript

<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.1/js.cookie.min.js"></script>
Cookies.set('cookie_name', 'cookie_value', { expires: 365 });
Cookies.get('cookie_name'); // => 'value'
Cookies.remove('cookie_name');
 
PREVIOUS NEXT
Tagged: #cookie #JavaScript
ADD COMMENT
Topic
Name
9+3 =