|
Posted by Carl on 03/02/06 20:01
Chung Leong wrote:
> Carl wrote:
>
>>Like already being logged in when you browse the same site in another
>>window or tab? I would think thats a good thing.
>
>
> I assure you that those who use the feature are very much dependent on
> it. When I reply to posts on Google Group, for example, I frequently
> would flip back to the previous screen in a different so I can see
> what's been said already. On occasions I would open still another tab
> when I want to cite a previous thread.
Did you have to log in again when you opened a new tab? The OP made a
comment about passing, among other things, a "user_id" in the url. I am
suggesting this in more appropriately placed in the session.
>
>
>>My advice would be the opposite, don't pass data in the URL unless you
>>have a good reason to, and there often are good reasons.
>
>
> It really isn't a matter of making a choice between GET and session.
> It's about using something in the manner that it's designed for.
> Session variables are designed for persistency. If that's what the
> situation calls for, then use them. If not, then use something better
> suited.
>
It sounds to me like you're saying you should use GET unless its a
persistent value, I say don't use get unless it's NOT a persistent value.
Tomatoe, Potatoe :)
> HTTP is a stateless protocol (by and large). A GET operation is
> understood to be side-effect-less (i.e. read-only). When you stuff URL
> parameters into the session, you're violating this basic assumption,
> and predictably, bad things happen: bookmarking goes bust, tab-browsing
> behaves weirdly, search engines can't spider your site, etc.
>
I may not have made myself clear, though i am pretty sure we are arguing
the same point here. You mention handling "URL parameters", and I gave a
suggestion on how to determine what constitutes is a "URL parameter".
Most posts before mine seemed to give a yes/no type answer, I was simply
_attempting_ to suggest that it is not as simple as that, and that
different the different problems require different solutions.
I replied to your post in which you said :
> Don't do it. Using session variables to somehow hide GET variables
> cause major navigation issues when visitors view your site in multiple
> tabs/windows.
And i suggested that passing the user_id in the url would require you to
log back in if you navigate back to the site in another browser/tab.
*Broken*, IMHO.
Cheers.
Carl.
Navigation:
[Reply to this message]
|