I am setting a cookie by Javascript and it is working fine but it is not taking the expire time I am giving. It keeps on taking session value regardless of what I give, belo
document.cookie = "cookie_name=cookie_value; max-age=31536000; path=/";
Will set the value for a year.