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

  • Home
  • SEARCH
  • 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 41539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:11:48+00:00 2026-05-10T15:11:48+00:00

There are various ways to maintain user state using in web development. These are

  • 0

There are various ways to maintain user state using in web development.

These are the ones that I can think of right now:

  1. Query String

  2. Cookies

  3. Form Methods (Get and Post)

  4. Viewstate (ASP.NET only I guess)

  5. Session (InProc Web server)

  6. Session (Dedicated web server)

  7. Session (Database)

  8. Local Persistence (Google Gears) (thanks Steve Moyer) etc.

I know that each method has its own advantages and disadvantages like cookies not being secure and QueryString having a length limit and being plain ugly to look at! 😉

But, when designing a web application I am always confused as to what methods to use for what application or what methods to avoid.

What I would like to know is what method(s) do you generally use and would recommend or more interestingly which of these methods would you like to avoid in certain scenarios and why?

  • 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. 2026-05-10T15:11:49+00:00Added an answer on May 10, 2026 at 3:11 pm

    While this is a very complicated question to answer, I have a few quick-bite things I think about when considering implementing state.

    • Query string state is only useful for the most basic tasks — e.g., maintaining the position of a user within a wizard, perhaps, or providing a path to redirect the user to after they complete a given task (e.g., logging in). Otherwise, query string state is horribly insecure, difficult to implement, and in order to do it justice, it needs to be tied to some server-side state machine by containing a key to tie the client to the server’s maintained state for that client.
    • Cookie state is more or less the same — it’s just fancier than query string state. But it’s still totally maintained on the client side unless the data in the cookie is a key to tie the client to some server-side state machine.
    • Form method state is again similar — it’s useful for hiding fields that tie a given form to some bit of data on the back end (e.g., ‘this user is editing record #512, so the form will contain a hidden input with the value 512’). It’s not useful for much else, and again, is just another implementation of the same idea behind query string and cookie state.
    • Session state (any of the ways you describe) are all great, since they’re infinitely extensible and can handle anything your chosen programming language can handle. The first caveat is that there needs to be a key in the client’s hand to tie that client to its state being stored on the server; this is where most web frameworks provide either a cookie-based or query string-based key back to the client. (Almost every modern one uses cookies, but falls back on query strings if cookies aren’t enabled.) The second caveat is that you need to put some though into how you’re storing your state… will you put it in a database? Does your web framework handle it entirely for you? Again, most modern web frameworks take the work out of this, and for me to go about implementing my own state machine, I need a very good reason… otherwise, I’m likely to create security holes and functionality breakage that’s been hashed out over time in any of the mature frameworks.

    So I guess I can’t really imagine not wanting to use session-based state for anything but the most trivial reason.

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

Sidebar

Ask A Question

Stats

  • Questions 64k
  • Answers 64k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer The MSI is the installer for you application. The setup… May 11, 2026 at 10:46 am
  • added an answer You should run your primary and backup as such. Do… May 11, 2026 at 10:46 am
  • added an answer I have since found that WAMP, when installed with Mod_rewrite… May 11, 2026 at 10:46 am

Related Questions

There are various ways to maintain user state using in web development. These are
in my application (c# 3.5) there are various processes accessing a single xml file
I've a DLL assembly, in which there are various classes. Each class has around
So I was wondering if there are any major differences between the various implementations
I've been evaluating various smart pointer implementations (wow, there are a LOT out there)
I have lots and lots of data in various structures. Are there any better
I need to check various codes in a Word document. These codes are usually
There are two weird operators in C#: the true operator the false operator If
There are two popular closure styles in javascript. The first I call anonymous constructor
There are a few ways to get class-like behavior in javascript, the most common

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.