Jeremy Orlow schrieb:
This is _exactly_ the use case SessionStorage was developed for.  :-)

On Fri, May 22, 2009 at 2:41 PM, Darin Adler <da...@apple.com> wrote:

I believe HTML 5’s sessionStorage is intended to resolve this issue.

   -- Darin


_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Hello,

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:
http://www.laliluna.de/blog/2009/05/19/browser_feature_request.html

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;>';
    $('form').append(tabId);
   });
  </script>

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 tabulator.

Map<String,Storage> storages = session.getAttribute(“storageKey&amp;rdquo;);
 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
---
http://www.laliluna.de
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to