Talking about the difference and connection between Session and Cookie

【Foreword】

      Cookies are a type of Session object. But there is a difference. Cookies do not occupy server resources, but are stored in the client memory or a cookie text file; while "Session" will occupy server resources. Therefore, try not to use Session, but use Cookies. But we generally think that cookies are unreliable and sessions are reliable, but many famous sites also use cookies. Sometimes in order to solve the page processing after disabling cookies, url rewriting technology is usually used, and a large number of useful methods in the session are called to obtain data from the session and then insert it into the page.

 

【main body】

    Specifically, I made a summary in the article http://www.cnblogs.com/jianxian/p/8626167.html

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326083668&siteId=291194637