Jump to:

22970 Posts in 11572 Topics by 2823 members

General Questions

SilverStripe Forums » General Questions » Silverstripe and Cookies

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 365 Views
  • woolyg
    Avatar
    Community Member
    2 Posts

    Silverstripe and Cookies Link to this post

    Hi all,

    In the PHP doco, it states that once a cookie is set, it can only be retrieved after the page/browser reloads.
    (Source: http://php.net/manual/en/function.setcookie.php)

    Are cookies in SS the same? ie. If I set one say in a controller, and the page loads, will it take a reload for the cookie data to be retrieved?

    Please advise - I am a complete & total noob to SS.

    Regards
    WoolyG

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Silverstripe and Cookies Link to this post

    Test it and see what happens! If that's what setcookie() requires then it's likely it will be the same as SilverStripe. Cookie in SilverStripe is simply a basic wrapper around setcookie

    365 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.