Re: sessions without cookies *or* URLs
| From: | David T-G | Date: | Mon, 07 Oct 2002 09:18:11 +0000 |
| Subject: | Re: sessions without cookies *or* URLs | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119057@lists.php.net to get a copy of this message | ||
Justin, et al --
..and then Justin French said...
%
% on 07/10/02 11:32 AM, David T-G (davidtg-php@justpickone.org) wrote:
%
% > It's a start; it confirms some of what I think I understand about
% > sessions. Now if only I can get the session ID out of the URL without
% > using any cookies... Any ideas, anyone?
%
%
% I Thought I made it clear, but I'll try again :)
Thanks :-)
%
% You have three options for maintaining state:
%
% - Cookies
% - URL
% - POSTed forms
OK. I was afraid of that...
%
% The most common method is plain cookies. But if you want guaranteed state,
Sure, but I know that cookies won't work, so that rules them out.
% then URL is the answer. My main problem with the URL method is that it
% requires the writer(s) to be careful when typing links... ensuring that they
Exactly. It's cluttered and you have to be sure to get it right if
you're typing it in.
% have the session ID in them. Impossible for a CMS. The answer is
% enabel_trans_sid.
Well, sorta :-)
%
% More and more hosts are compiling with enable_trans_sid... what this does
% is: attempt to pass the SID around in a cookie. If this fails, it will
Right.
% re-write any relative URLs in your pages to include the session ID... it's
So I can code without having to put the ID on the URLs myself? So the
"transparent"-ness is for the programmer? Well, I do like that...
% the best of both worlds... transparent cookies if possible, otherwise the
% SID is passed around in a URL.
Right.
%
%
% So, this rules out a complaint about complicated URLs, because you don't
% have to type them.
I may not have to type it as a programmer, but the user might have to
type it as a surfer.
%
%
% I urge you to look around all the big sites... if they need to maintain
% state (a session) they do so with URLs... amazon.com, whatever -- they all
% do it.
Yeah, I know.
%
% Why do you not wish to use URLs?
Because they're cluttered and it puts the session ID also in the user's
goto cache.
%
%
% Justin
Thanks & HAND
:-D
--
David T-G * It's easier to fight for one's principles
(play) davidtg@justpickone.org * than to live up to them. -- fortune cookie
(work) davidtgwork@justpickone.org
http://www.justpickone.org/davidtg/ Shpx gur
Pbzzhavpngvbaf Qrprapl Npg!