Re: Managing state
- From: "C. (http://symcbean.blogspot.com/)" <colin.mckinnon@xxxxxxxxx>
- Date: Mon, 19 Oct 2009 06:12:57 -0700 (PDT)
On Oct 15, 5:04 pm, Mark Smith <marksmith5...@xxxxxxxxxxxxxxxxx>
wrote:
On Oct 15, 4:37 pm, Captain Paralytic <paul_laut...@xxxxxxxxx> wrote:
On 15 Oct, 15:38, Mark Smith <marksmith5...@xxxxxxxxxxxxxxxxx> wrote:
I'm working on a project that stores state information in session.
(Specifically the ID of the database entity the user is currently
working with.)
A drawback of this method is that everything gets out of sync the
moment a user opens more than one window.
Are there any frameworks / patterns out there that help manage storing
and retrieval of stateful information like this from the page instead
of session?
Thanks for any suggestions.
Well, asuming that they are interacting with the server using a FORM,
it can be held in a hidden input element in the form.
I know this, but doing it manually for lots of variables will be error
prone and difficult to manage as more pages are added. I was hoping a
component existed that wrapped everything up.
My understanding is .net provides something like this, but as my
platform is unix I was wondering if something like this existed for
php?
There is no way that any server-side toolkit can deal with this
scenario effectively. Certainly with MSIE you can have the same cookie
name storing different values in different browser windows - but this
is not well documented and is not standard HTTP. I have no diea if
this can be used to split an existing session.
The only way to approach a generic solution is to divide the session
into separate areas identified by a secondary handle - which you then
need to propagate through every form and every href on every page.
If you absolutely must do this (I'd strongly recommend that you make
sure sure you've exhausted every other approach) then you might find
it easier to write a standard javascript to automatically rewrite the
href URLs and forms at run time rather than doing it in your PHP code.
C.
.
- Follow-Ups:
- Re: Managing state
- From: Mark Smith
- Re: Managing state
- References:
- Managing state
- From: Mark Smith
- Re: Managing state
- From: Captain Paralytic
- Re: Managing state
- From: Mark Smith
- Managing state
- Prev by Date: Re: Getting around a weird browser cookie bug...
- Next by Date: Re: PHP learning Tutorial
- Previous by thread: Re: Managing state
- Next by thread: Re: Managing state
- Index(es):
Relevant Pages
|