Session management is an important part of web development, including Session and Cookie technologies. 1. Cookie working principle setcookie () 2. Cookie application development can only read a single domain of no more than 20 cookies. Each Cookie file has a length of 4 K bytes, the browser can store up to 300 cookies and 6 attributes: name, value, expires, path, domain, secure save Form Content Control Access Authorization 3. Write a common Cookie Class 4. Solution cookie Access optimization a series of cookie data can be saved to the array to check whether the client supports setting a cookie for the first run, then call the second-level domain name to implement setcookie (name, value, expires, path, 'domain. com ', secure) cookie Security cookie limit 5. session concept 6. session configuration 7. session application creation and modification view the current sessionid changes the expiration time of the session. cookie_lifetime destroys the current session 8. session encoding and decoding session_encode () session_decode () 9. Saving arrays in sessions 10. Saving objects in sessions 11. session Access optimization 12. Sharing sessions under multiple servers (important) 13. session Security