[webkit-dev] Browser issue with multiple tabulators

Sebastian Hennebrueder usenet at laliluna.de
Sun May 24 14:22:22 PDT 2009

Jeremy Orlow schrieb:
> This is _exactly_ the use case SessionStorage was developed for.  :-)
> On Fri, May 22, 2009 at 2:41 PM, Darin Adler <darin at apple.com> wrote:
>> I believe HTML 5’s sessionStorage is intended to resolve this issue.
>>    -- Darin
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

thank you for the feedback but I only partly agree. The sessionStorage 
is client side but I was looking for a way to properly handle the 
'merged session' on the server.

Here is a part of what I posted on my blog:

The client side storage stores the information on the client side and 
not on the server side. I was looking for a way on the server to find 
out, if a request comes from a different tabulator. The session storage 
could help me to find a better workaround. Below you can see Javascript 
code with the Jquery library, which basically creates a random id for a 
tabulator and adds this id to all forms on the screen. I could improve 
the script as well to append the tabulator id on all links as well.

  <script type="text/javascript&amp;quot;>
    $(function() {
     if (!sessionStorage.tabulatorid)
      sessionStorage.tabulatorid = Math.random();
     var tabId = '<input type=&amp;quot;hidden&amp;quot; 
name=&amp;quot;tabulatorid&amp;quot; value=&amp;quot;' + 
sessionStorage.tabulatorid + '&amp;quot;>';

But this is a workaround and in addition requires JavaScript on every 
page to add the tabulator id to everything which triggers a request to 
the server. As a consequence, my problem is not solved in a beautiful way.

What about an approach which links the client side sessionStorage to a 
serverSide storage? Each client side sessionStorage gets an ID assigned 
from the browser. This ID is send as request header to the server. This 
would allow to easily push data back and forward from client storage to 
server storage or to split data between client and server. On the server 
I could use Java code like the following to get the data for a specific 

  Map<String,Storage> storages = 
  Storage tabStorage = storages.get(tabId);

If I close the browser, I could save the storage data on the server and 
next time, I log into my application, I can just fill up the client 
sessionStorage with the saved data.


Best Regards / Viele Gruesse

Sebastian Hennebrueder

More information about the webkit-dev mailing list