Synchronizing HTML panels across multiple clients

I’m making a kind of ingame web browser that uses the plasma screen model from CS: Source, displaying the browser on it’s screen of course, and I’ve run into a problem: When one client changes the page by clicking a link, it only changes for that client. Is there a way to synchronize HTML panels across multiple clients? If there was a way to find out the current URL of the HTML panel that would be perfect, but there doesn’t seem to be and there’s absolutely nothing about it on, and the wiki only shows the basic stop, refresh, openurl, and sendhtml commands. I could’ve sworn there were more.
Any ideas?

local Stuff = Site:GetTable()
PrintTable( Stuff )

Would give you the url and other things about the html page.

Sadly, there is no “GetURL” on that panel. Request it on
With that, you could check the URL of a HTML-Panel all the time and if it’s changed, you send this to every other player too.

Hmm, take a look at this

it literally makes a really frigin laggy panel on everyone’s screen that syncs so that everyone sees the same thing, so the code you want should be in there (although again, potentially VERY laggy unless you go the chrome DLL route)

Thanks guys.

What I’ve actually wound up doing is overriding the OpeningURL function like so:
local currentURL = “”

function myHTMLPanel:OpeningURL( url, target )
if currentURL ~= url then
RunConsoleCommand(“browser_syncurl”, url)
currentURL = url
Then the server sends that URL to everyone via a usermessage.
The only problem is that it seems to trip over it’s self whenever there are ads, and send the URL of the ad to OpeningURL, which then causes a big fuck up to where you can’t see the page you want to see. It’s like OpeningURL isn’t just for when the URL of the page you’re on changes, it’s whenever it loads a new URL–even an image, in this case. I’ve tried overriding the HTML panel’s Think function the same way, checking if myHTMLPanel:GetTable().URL has changed, but I’ve failed with similar results. This may just be popups though, or some dodgey javascript that the ads are using. Any ideas on how to fix this–or create my own Lua popup blocker somehow?

If the status in the HTML:GetTable() (I think it tells you when the page is done) then if it DOES tell you when the page is done loading, Just do HTML:Stop()… I’d think that would work.

This functions is not called if you press a link in the webpanel. It only works if you change the URL with lua - which was not asked for.


GetTable on a panel returns the class-table of a lua-created Panel. If the panel is created in C++, you don’t gain any information from there. Btw: You could have easily tested that it does not work.

Actually no, it works just fine.

Actually no again, html:GetTable().URL works just fine. So does html:GetTable().Status.

Tried that but had the same result. I think it may have to do with popups and dodgey javascript more than anything. Thanks anyway!