jQuery cookie

Project was re-written and dropped jQuery dependancy

jQuery cookie github page;

<script>
var cookie_options = {
	path: '/', // cookie is valid across the entire domain
	expires: 365, // expires in 365 days
	//domain: 'example.com', // by default domain of page where the cookie was created
	secure: false, // if true, the cookie transmission requires a secure protocol (https)
	raw: false // by default the cookie value is encoded/decoded when creating/reading
};
$.cookie( 'cookie_name', 'cookie_value', cookie_options ); // set cookie
cookie_value = $.cookie( 'cookie_name' ); // get cookie
$.cookie('cookie_name', null); // delete cookie
</script>

Leave a Reply

Your email address will not be published. Required fields are marked *