SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2011
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.


  2. #2
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    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.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  3. #3
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    http://www.sitepoint.com/a-better-co...d-web-storage/ - A better cookie, web storage - a recent SP article

  4. #4
    SitePoint Zealot
    Join Date
    Jul 2011
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is web storage reliable or should I need some kind of fallback for older browsers?



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •