i have a situation where i want to load different webpages in a browser where the URL will be passed over the web-sockets.
Now the problem is, if inside one html page which is connected to the sockets server, it receives a command to redirect to another url, the socket connection is lost and it is not possible for the new page unless it has this socket functionality built in it.
One idea is to use a main page with inlineFrame where i keep changing the pages while main page remains connected to the socket server.
I want to know, is there more efficient way of doing this task where i am supposed to received url commands over the socket but idea is to avoid iFrames??
i have a situation where i want to load different webpages in a browser
Share
It sounds like your main page is acting like a web browser. It gets a new URL and then loads a real page based on that. You need something to maintain state and control which page is loading and the only way to maintain state with WebSockets is to keep that page open and the connection established.
The only solution I can see is the IFRAME one that you have suggested.