177 points · by auraham · 1d ago · 63 comments
If you're looking for the engine code, you'll find most of it there (and in the subrepos like https://github.com/DioxusLabs/taffy, https://github.com/linebender/parley, and https://github.com/servo/stylo that we push much of the engine into so that they can be used standalone.
Looks like this adds JavaScript and CDP support on top of Blitz (similarly to Cloudflare's https://blog.cloudflare.com/kitesurf)
https://www.destroyallsoftware.com/talks/the-birth-and-death...
[1] https://github.com/xanatoo/xanatoo
[2] https://xanatoo.github.io/wasm/ (limited functionality due to CORS)
The most trivial use case it's OFC doing what Libredirect does in Chrom* and FFox based browsers (Youtube->Invidious, and so on). Then would call mpv+yt-dlp with a script on every MEDIA link you find.
Also, Medium.com->Scribe.rip, X.com ->> xxcancel.com... just write a small URL plumber replacing "$1" (first argument, the current URL for dilloc) per domain with sed (or an AWK script) and you can do magic (think:curl can take cookies too). Paywalls? Gone. Wayback Classic? A right click in the page -> look up/archive it thanks to a really easy -novice level- script. Wget --mirror --foo --bar a whole homepage or directory? Easy, too.
Just noticed that there's a full list of all sorts of tests automated. Pretty cool project overall
no CORS proxy
The browser in the browser can't run the WASM runtime itself (yet), but it can play the demo videos, recommend "Deeper than the talk"
Thank you for the laughs
From what I understood, it was specifically created to eliminate the dependency on (headless) browsers, for AI agents.
It does also have an in-browser version, though (i.e. this demo). The two seem to have quite different use cases.
Websites can block iframes from unknown origins by setting a Content Security Policy header in their responses, or through an X-[header]
The way tinybrowser does show contents is through a proxy (most probably a WISP proxy, I haven't checked). This is pretty much a way to send http requests through websockets. They do not contain your cookies from the host browser. And they are not checked/parsed by the browsers HTTP parser, so they are not affected by those security measures. The downside is all requests need to go clear text through the proxy, which in some scenarios can be a no no, but in the usecase of tiny proxy I don't think it is an issue.
Regarding 'so Playwright and Selenium can drive it.' this can play botting and scraping into hands. So you can use your imagination to use this for good or bad, or think of scenarios where others would use it for either. It also mentions 'agents love tinybrowser', so there's that.
(Also, lol at the "testimonials"!)
This reminded me, in uni I made a web scraper that ran fully in the browser.
Or it would have, if CORS didn't exist. I had to proxy it thru a 1 line PHP script so requests would be "to the same server". Sekurity achieved.
Of course, web scraping is recursive, so I thought, why not visualize that? So it would extract links from each loaded page, and then fetch those pages too. And then render those websites in nested divs under the original one, and so on. Web-ception!
Original code lost, but I recall it being like 30 LoC or something.
Edit: OK Recreated it from memory but without the recursive scraping bit. So it's just a "normal" browser-in-browser now (lol). Microscopic Python proxy included. https://pastebin.com/AMwCkZai
Are there any memory benefits of using this to render a page?