Results 1 to 3 of 3

Thread: Local state management vs Server session management

  1. #1

    Default Local state management vs Server session management

    I'm still feeling confuse of session state management in javascript application.

    As I'm moved from the traditional server side programming to the Ajax world, in my point of view, the data carried between the pageload can now be handled in the client side by saving it in the memory, so...can I say that the server side session could be replaced by this way of implementation?

    I know there may have some security issues on it, but I think it could be handled by the server side.

    Anyone can give me some suggestions? thanks

  2. #2
    Sencha User MiamiCoder's Avatar
    Join Date
    Mar 2009
    Miami, FL


    Client-side state management:
    • In some scenarios, it reduces network traffic and/or simplifies your client application, because you are not doing roundtrips
    • Generally, you can store less data than if you used the server side approach
    • You have less control over the integrity and consistency of the state, due to the environment where you're saving it (the client)
    • State is confined to a computer, cannot follow the user
    • Needs roundtrips to the server and the complexities that come with those
    • You have more control: what, where, how long you keep it
    • Can follow the user accross system boundaries
    You have to decide what's better for your situation.

  3. #3


    MiamiCoder is spot on.

    A word of warning with client side state management. We turned on the standard Ext cookie state manager on a panel we have that contains 7 tabs with each tab containing a grid and the cookie was over 14K in size and blew the header limits on the web server. Ouch!

    We now run with our own http state provider, based on the Ext one, for that reason alone.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts