I was thinking of that but then couldn't figure out how I'd handle clicking the back button in the browser.
Doing a little research we've found a plugin for Firefox called MultiFox that does what I want. We are also going to play later today with the multi-personality features of chrome and firefox to see if that is an alternative for us. On Fri, Feb 19, 2016 at 9:17 AM, Niphlod <[email protected]> wrote: > the less session you use, the more your app is scalable. that being said, > it's pretty clear that you can't leverage in python something that is only > available on javascript. > maybe but just maybe you can POST back to web2py a variable that is stored > on the sessionstorage (i.e. the current date if sessionstorage.currentdate > does not exist yet) and use it to namespace your session key names (hence, > values) amongst tabs. > > On Friday, February 19, 2016 at 2:20:14 PM UTC+1, Jim S wrote: >> >> Thanks for the reply. However, I'm unclear on how I might use it >> effectively. >> >> My scenario in my app: >> >> I have a python object that I pass around to different pages. At the end >> of each of my controller methods I do the following: >> >> wo = Workorder(auth.user.id, workorder_id) >> >> >> # save to the session >> session.workorder = cPickle.dumps(wo.to_dict()) >> >> >> Then, at the beginning of each controller method I do: >> >> wo = Workorder(auth.user.id) >> wo.from_dict(cPickle.loads(session.workorder)) >> >> >> So, with my limited javascript knowledge, I don't see how I'd be able to >> convert this to sessionstorage. And actually, I don't know if what I'm >> doing with pickling/unpickling dicts is a smart thing to do. If anyone has >> any pointers/comments, I'd appreciate it. However, it seems as though I >> may need to rethink my strategy. >> >> Thanks for taking a look. >> >> -Jim >> >> >> On Friday, February 19, 2016 at 2:45:05 AM UTC-6, Niphlod wrote: >>> >>> every browser considers tabs as belonging to the same session in regards >>> to cookies. there's no way to separate those using web2py code. >>> you can leverage sessionstorage in javascript that keeps values alive - >>> and compartimentalized - to a single living tab. >>> >>> On Friday, February 19, 2016 at 4:56:21 AM UTC+1, Jim S wrote: >>>> >>>> Hi >>>> >>>> Is there a way to keep independent session variables between two open >>>> browser tabs? >>>> >>>> Example >>>> >>>> 1. write a session variable in tab 2 >>>> 2. switch to tab 1 and execute the same page setting the session >>>> variable to a different value >>>> 3. go back to tab 2 and request page that reads the session variable >>>> and gets the value set from tab 1 >>>> >>>> Is there any way to force each tab to have it's own session variables? >>>> >>>> -Jim >>>> >>> -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/aEUuKWvkJAY/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

