I agree, just generate a unique token for each initial request and then 
segment your session data by that key.

On Thursday, January 3, 2013 3:58:02 AM UTC-8, Jordon Bedwell wrote:
>
> On Thu, Jan 3, 2013 at 5:54 AM, PierreW <[email protected]<javascript:>> 
> wrote: 
> > And also: in this instance I don't need any data merging. I just need 
> > to make sure each "request" (HTTP + following AJAX) is using its "own" 
> > stuff. Each request from different windows / tabs is completely 
> > independent. 
>
> Why not have the Ajax generate a token of it's own and send it along? 
> That way the browser handles it's own uniqueness and tabs are 
> included.  You then use that uniqueness to track the data in the 
> database (or redis or whatever suites your purposes) rather than using 
> the session ID.   Of course you would also use the session + sesson id 
> to track which unique identifiers belong to a client but yeah.  The 
> only downside is that then you also have to timeout if they don't 
> respond after a certain period or you end up with a million 
> identifiers you don't need. 
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/VgTvNZleM4wJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to