+ 1
Cookies, Local or Session Storage
What is the difference between Cookies and Local or Session storage?
1 Respuesta
+ 2
Cookies are small files stored on your computer which websites request through the browser, to offer a personalised experience: if they know you always like a cheap deal, online shops will always recommend cheap deals. Cookies are stored on the user's computer.
Session storage is data stored by the browser, which on termination of the browser window, will be deleted. The data is stored in a temporary file.
Local storage is data stored forever, by the browser in its file directory. Local storage may not be used across computers, the files must be transfered over.
Session storage is the recommended solution to temporary storage, cookies have a limitation on size, while session storage files are significantly larger.
Local storage can be used, if you want to store a web-game's player data, inventory, world pos, etc.