3 Replies Latest reply on Aug 12, 2018 7:46 AM by Mahmoud_Rabie

    Collections and 0 Session ID

    Habib

      Hi

       

      I am developing a public Shopping Cart application and it uses Collections to hold the Products the users add to the cart before/after signing in. I am using 0 session ID to make the URL simpler and Search engine friendly.

       

      If the user adds some items which adds some rows in the collection and refreshed the page using the browser for some reason, everything in the collection is lost.

       

      However if I don't use 0 session ID the collection remains persistent.

       

      APEX Version: 18.1

      ORDS: 18.1.1

      Database: 11.2.0.2

       

      Can someone please help?

       

      Regards,

       

      Habib

        • 1. Re: Collections and 0 Session ID
          Mike Kutz

          Web Applications are STATELESS.

           

          The Web Server cannot distinguish between your web session and my web session unless we give it a unique web Session ID.

           

          If you stick with a common web Session ID between all end-user, then my Items will show up in your basket.

          This is because we are using the same web Session ID.

           

          What you desire does not conform to reality.

           

          solution:

          Don't do that.  (ie don't use Session ID = 0)

           

          My $0.02

           

          MK

          • 2. Re: Collections and 0 Session ID
            Habib

            Thanks Mike. It makes sense.

             

            However being a public application and Search engine friendly what else can I do instead of using 0 session ID?

            • 3. Re: Collections and 0 Session ID
              Mahmoud_Rabie

              Hi Habib

               

              Public Shopping Cart!! Who are buying what?!

               

              To build a search-friendly Website you could think in customization of Universal Theme to reach the look-and-feel you wish. Some pages of your Application would be public and some would require authentication and authorization schemes depending on your business needs.

               

              In addition, if you don’t like Universal Theme, you could use Material APEX. However, it is not working fine with 18.1 until now.

              https://materialapex.com/pls/apex/f?p=12192:1

               

              I hope that helps

               

              Regards

              Mahmoud