What is the difference between localStorage, sessionStorage, session and cookies?
问题 What are the technical pros and cons of localStorage, sessionStorage, session and cookies, and when would I use one over the other? 回答1: This is an extremely broad scope question, and a lot of the pros/cons will be contextual to the situation. In all cases, these storage mechanisms will be specific to an individual browser on an individual computer/device. Any requirement to store data on an ongoing basis across sessions will need to involve your application server side - most likely using a