Martin Hejnfelt wrote:

> however then comes the
> issue, that each webpage, when "browsing" through the app, will have no
> knowledge about the previous connection, and as far as I know, there is no
> way of "saving" a connection object like this in the browser for
> persistance.

Not the object, but you can save some identifier (e.g. a SessionID) into a 
cookie and/or pass it back and forth through each page reload, whatever makes 
more sense. That ID is then used to reinitialize the next page.

> To keep a persistent thrift websocket connection on a javascript
> based "webapp", where multiple pages should share the same
> client instance, I propose to create a "TPageTransport" or something
> like that, that utilizes javascripts features onmessage and postMessage,
> so a persistent hidden top window/frame will have the "real" connected
> client, while the pages (inside an 100% width/height iframe) initializes
> clients" with the TPageTransport which then through these onmessage/
> postMessage methods gets data to and from the "real" client.

So in other words we need the IFRAME only to preserve some information about 
the connection, right? And if you store that into e.g. a cookie, there is no 
need for the IFRAME anymore?

Second, you wrote plural “clients”. Does that read (a) “Only one IFRAME and one 
client at a time” or is it really (b) “more than one IFRAME / client in 
parallel”?

Have fun,
JensG

Reply via email to