How Do I Access A Simulated Webpage Using HTTP Service?

Hey all! This is a bit of an advanced question, so… Here goes.

I have made a Web Browser in my Roblox game, and it kinda works. I have designed a custom HTML thingy.

However, since I use the HttpService:GetAsync(), it only gives me Source Code.
This, of course, is not good, because many sites must be run on a web browser (and execute their JavaScript) in order to look how they should, and display all necessary HTML elements.

Is there a way, without emulating JavaScript into my game, that I could make a request to a website, and have it give me the HTML elements it would display in a normal browser?


Google Chrome:

My Game:

(My game just gets a list of Anchor elements, and none of the other text)

1 Like

Your web browser does exactly the same as your script when you request a website: Download the pure source code. The entire magic of turning into visible content is handled by scripts in your browser.

There are several open source modules which parse a HTML page into programmable tables. However, due to different styles and practices of different HTML writers, finding an open source parser which flawlessly replicates what browsers do nowadays is probably going to be hard.

You cannot evaluate the source code (or JavaScript) in Roblox, nor can you load assets (images, etc) which aren’t Roblox library assets.

Roblox is a platform meant for players of all ages, including the little ones, so they require to ensure kids are not exposed to unsuitable content. You probably shouldn’t attempt to create a web browser inside of Roblox.


and… if you’re just going for the effect of a “simulated” browser for a game or something, it’s a lot easier to make it with a few images and button frames