php - Storing a list of data temporarily future use -
i have search box on website user can search songs. website shows list of possible songs matched users search string. want store list of songs buffer or temporary storage memory if user refreshes/changes page list stays there.
now after research found possible ways are-:
- creating file , storing data it
- creating session storing data.
- creating cookie storing list.
i don't know other way. according possible way store data temporarily in php
this definitly job php sessions.
the requirements are:
- temporary storage survives page reload/change: sessions that
- per user cache: sessions per-user
of course cookies can well, pretty limited in size, , exchanged between client , server @ each request, argued more suited long surviving data, example per-browser user preferences website.
creating files should avoided, since, example using file store sessions, php itself, automated system able handle session expiration more tedious implement manually.
Comments
Post a Comment