今天听胡高手说cookies和session:用session或者cookie 区分不在于前后台, 区分在于你需要保存的信息是什么东西,比如前台一个用户登录,你可以把用户id放到cookie或者session里,如果用户要去修改密码,你会在cookie或者session里找用户的id看是不是存在,浏览器每次请求都回把cookie放在请求里提交上去,我google了一下,英文原话is:
What are session cookies used for?
Without cookies, websites and their servers have no memory. A cookie, like a key, enables swift passage from one place to the next. Without a cookie every time you open a new web page the server where that page is stored will treat you like a completely
今天听胡高手说cookies和session:用session或者cookie 区分不在于前后台, 区分在于你需要保存的信息是什么东西,比如前台一个用户登录,你可以把用户id放到cookie或者session里,如果用户要去修改密码,你会在cookie或者session里找用户的id看是不是存在,浏览器每次请求都回把cookie放在请求里提交上去,我google了一下,英文原话is:
What are session cookies used for?
Without cookies, websites and their servers have no memory. A cookie, like a key, enables swift passage from one place to the next. Without a cookie every time you open a new web page the server where that page is stored will treat you like a completely