Hi, I’ve been struggling with the concept of maintaining a WAMP connection within a website when the user switches between pages.
For greenfield projects it’s easy, just write a single page application and mimic links and page switches, but that doesn’t do much for pre-existing web sites.
The best I’ve come up with thus far is to load a dummy page with autobahn, make a websocket connection to crossbar, then run the “actual” website in an iFrame.
(then I can access the WAMP connection from within the website by referencing the iframe parent)
Need to be a little careful with how the iFrame is handled but it seems to work, and I’ve managed to implement this mechanism as a Wordpress plugin (as Wordpress accounts for most of the sites I work with)
- this seems to work fairly well, but it “feels” like a kludge.
Workers look interesting, but support seems incomplete in different browsers and looking at the forums, maybe a little buggy.
Anyone got any recommendations / pointers?
(I did look at the page on the crossbar site, but it seemed a little inconclusive …)