Retrieve data over a long period of time: are cookies the best solution?

Hello,

I’m going to need to store/retrieve data from users. It’s typically a case where cookies could be used. But… Are $_COOKIES the best approach? Is there another type of technology (oAuth?) that could replace cookies?

Best.

:slight_smile:

It would depend on the data involved, if the data is sensitive and should not be made available (for manipulation) even to the user then no, cookies would not be an option.

You could however store the data in a database and store a unique identifier for this data in a cookie; such as the id column.

http://www.sitepoint.com/a-better-cookie-html5-and-web-storage/ - A better cookie, web storage - a recent SP article

Is web storage reliable or should I need some kind of fallback for older browsers?

:slight_smile: