Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • klaus 15 posts 35 karma points
    Mar 03, 2021 @ 10:38
    klaus
    0

    Is there a buil-in functionality in Umbraco to save session state?

    HI Say I watend to create a webshop and I would like to hold the users session and items he or she has put into some sort of a basket, how would you go about doing so in Umbraco? I guess you could use Umbraco Content Service to create a temporary document that hold important information, or you could use regular session cookies or maybe local storage?

    Any thoughts on this?

    Thanks Klaus

  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Mar 03, 2021 @ 22:30
    Alex Skrypnyk
    0

    Hi Klaus

    Session means that it lives for some short period of time, so I think cookies or localStorage should work.

    Create a node and save data there - it looks like not session way. It's more long live.

    Thanks, Alex

  • klaus 15 posts 35 karma points
    Mar 04, 2021 @ 08:01
    klaus
    0

    Hi Alex, Thanks for your response. In the case the user puts items in the basket then closes the page and then later returns to continue shopping - how would you go about this scenario?

    Thanks

  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Mar 04, 2021 @ 23:15
    Alex Skrypnyk
    0

    Hi Klaus

    I would probably store all data on the client's browser, but it depends on how it was built.

    Are you using some fancy js library for client-side logic?

    I would use a serverside session if it were an old web-forms :)

    Thanks,

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft