Cookies.js
localStorage.getItem("token");
localStorage.setItem('token',"token");
document.cookie = "token=111111111"
var token=getCookie("token"); function getCookie(key) { var cookies = document.cookie; var cookie_pos = cookies.indexOf(key); if (cookie_pos != -1) { cookie_pos += key.length + 1; var cookie_end = cookies.indexOf(";", cookie_pos); if (cookie_end == -1) { cookie_end = cookies.length; } var value = unescape(cookies.substring(cookie_pos, cookie_end)); } return value; }