1 Reply Latest reply on Oct 11, 2010 5:27 AM by JeffryHouser

    Sessions in Flex

    RandomReado Level 1

      Can anyone tell me how sessions work in Flex? From a browser perspective, I understand when a new session is created the ID is saved into a session cookie client-side and this ID is used to link the browser to the server-side session. But I can't find any cookies that relate to my Flex application (assuming it uses cookies).

        • 1. Re: Sessions in Flex
          JeffryHouser Level 4

          Session informatione is, basically, every variable you create and store in the Flex application.


          Sessions cookies are a work around for the stateless nature of HTML Pages.  Every HTML page exists in isolation andk nows nothing about any other HTML page or the history of the user viewing that page.  The server sets a cookie to match the request up a request with a server side session.


          In Flex, there is only one page request, so no need for cookies to keep track of sessions.  The complete app exists 'once' for each user; as opposed to the server side code which is shared across all users.


          That said, if you need sessions for your server side code; remote requests from Flex will include the cookie information set by the server; which will allow said requests to match your remote call to a server side session.


          Flex does not have access to read browser cookies, although it may be possible to do so using ExternalInterface and JavaScript.