Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 347661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:17:30+00:00 2026-05-12T11:17:30+00:00

I am in the process of making a website that involves a shopping cart.

  • 0

I am in the process of making a website that involves a shopping cart.
There are two major requirements:

  1. The user experience guys want login/authentication to be the very last step in the entire work flow. The user gets to do all the shopping and is asked to login only at the time of checking out.

  2. The shopping cart shouldn’t expire(not even on browser close) unless the user (registered or not) does check-out.

In the above context, I have the following question with respect to maintaining the cart’s state:

Should I go with file based or database sessions? Please keep in mind this would be for unregistered users. My apprehension is that I’ll end up having lots of records in the database.

Another option seems to be to put the cart contents in an encrypted cookie, but then there’s a size limitation on the cookie file.

What would you do in this case ? I would really appreciate your answers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:17:30+00:00Added an answer on May 12, 2026 at 11:17 am
    1. Tracking a user. Use a GUID
      encoded into a cookie with an
      nYear expiry.

    2. Storing a Shopping Bag. You don’t want to store the bag in the cookie, mainly due its possible size. This leaves the option of persiting it to a medium and retrieving it from the medium. Using anything except a database for this would be like going back in time, databases excel at storing and retrieving data.

    3. Managing you Shopping Bag. Now, the
      question of your schema, firstly, if
      your going to be running queries
      against the shopping bags in the
      database (i.e. how many shopping
      bags contain item x) you probably
      want a traditional relational
      schema. However this has overheads
      in terms of inserting. updating,
      selecting (and joining) and deleting
      bag data (at some point you’ll have
      bags that will never be used again
      but are taking up precious disk
      space). With a busy site, this is a
      fair few Traranactions Per Second,
      but any database should be able to
      cope. If you don’t need to query
      the shopping bags in the database,
      then you can store it as XML. Just
      serialize the bag and dump it into a
      table, with the PK as the GUID as
      stored in the users cookie. This
      would be a lot faster than a
      traditional schema, plus you could
      always tear apart the XML in the
      future if a requirment did come up
      for a relational schema.

    This is what we do (Xml Bag), and we have a million+ customer base.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys I'm in the process of making this website here: http://craigmarkdrums.com (bare in
I am currently in the process of making a new ASP.net MVC website, and
I am currently in the process of making an application that runs 24/7 and
We are in the process of making our website international, allowing multiple languages. I've
Alright, I'm in the process of making a C# application that uses an API
i build a website in vb.net ... i have a table process that have
Im making a rudimentary human test for a form on my website. I want
This in the process of making a website compatible with IE7. The main css
I'm in the process of writing an image script for a website I'm making,
I'm making a web application for a customer that has clients who want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.