Tinybrowser: A browser running directly in the browser

172 points by auraham a day ago on hackernews | 61 comments

silverFork | 23 hours ago

Cute.. it doesnt display video though..

flowerlad | 23 hours ago

What are some use cases for this?

nmstoker | 23 hours ago

Options for easier frontend based web scraping/automation?

mapontosevenths | 23 hours ago

Now we can finally have an electron based web browser!

krackers | 23 hours ago

Sandboxing seems like a low-hanging one.

citbl | 23 hours ago

Using one's monthly quota of tokens.

andai | 23 hours ago

If you check "iframe vs tinybrowser", the use case is that tinybrowser loads, and the iframe does not. At least on my machine. (Maybe a web security thing? I don't understand the details here.)

anomalousblob | 16 hours ago

Yes it's a security thing. Browsers do not load certain iframes if the target website does not let them. This helps prevent certain attacks like "click jacking". For example, making an invisible iframe and making you press something inside there, like for example pre-loading a page of some vulnerable website with "send XYZ items to attacker". Other attacks include leaking information (is the user logged in?) to certain pages (there is a way to leak if an iframe contains a certain html element with id X).

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.

A few years ago I was trying to write my own HTML+CSS renderer for an email client I was writing, so that I could render HTML emails. I didn't want to embed the entire blink engine for that. This could be one use case for such a browser.

spicybright | 23 hours ago

But this only runs in a browser. If your client was a website you would just do an iframe, if not you'd have to load the entire blink engine anyways.
Oh sorry, I interpreted the question as "What is the use case of writing a toy browser like this?"

andai | 23 hours ago

>But this only runs in a browser.

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.

roywiggins | 22 hours ago

You can run it directly in a WASI runtime, you don't need a full browser to host it.

nicoburns | 12 hours ago

The underlying engine (https://github.com/DioxusLabs/blitz) is Rust code that runs natively.

spankalee | 23 hours ago

I'm building a Wasm-based graphical runtime (think GPUI, uses Taffy, etc., for layout and paint, but where every component is Wasm) and this would be a neat way to render web content without having to pull in an OS-level web view.

Fnoord | 23 hours ago

Well, I want to have a browser available which always uses a proxy (but does not use Tor). So I used https://docs.linuxserver.io/images/docker-firefox/ and it uses 500 MB out of the box. My server has total 64 GB RAM, and... RAM is expensive.

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.

thatsabadlook | 23 hours ago

Anthropic gets paid and free advertising.

hhthrowaway1230 | 23 hours ago

Sometimes I dream of a reader mode only web-bowser to cut trough the noise and an age where JS and ads don't exist.

arcanemachiner | 20 hours ago

Someone needs to make a website that embeds the Lynx browser...

azeirah | 14 hours ago

grumbel | 18 hours ago

That's what I am trying to build with xanatoo[1][3]. It's however very early, very experimental and not really all that serious of a project, more just trying to play around with what works and what doesn't. Web support is rather limited due to all the Javascript anti-bot challenges, but it does support RSS, Lemmy, Bluesky, Nostr, Gemini, Wikipedia and a bunch of other stuff. Works an Android 5+, Linux and some other systems, has a WASM demo as well[2], not optimized for phone use, but works quite well on a 10" tablet:

[1] https://github.com/xanatoo/xanatoo

[2] https://xanatoo.github.io/wasm/ (limited functionality due to CORS)

[3] https://xanatoo.github.io/

anthk | 17 hours ago

Dillo, with dilloc you can write your own scripts (calling external tools and re-rendering the page) and maybe with qjs (quickjs from Bellard) pass away the JS challenges and use tons of websites.

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.

nicoburns | 12 hours ago

The Blitz web engine that this tinybrowser is built on is exactly that https://blitz.is

jbird99 | 23 hours ago

Yo dawg I heard you like web browsers

k0morebi | 23 hours ago

Beat me to it

lioeters | 9 hours ago

I was looking for this and was not disappointed. The hivemind for the win.

xerios | 23 hours ago

Decided to try out an oldschool browser test (acid3) and it received a 67/100 score. Neat.

Just noticed that there's a full list of all sorts of tests automated. Pretty cool project overall

andai | 23 hours ago

Huh, very cool. Not quite interactive speed, but I guess it's meant for agents, so plenty fast for 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

spicybright | 23 hours ago

Disappointed you block it from running itself :)

Fnoord | 23 hours ago

First thing I tried: a tinybrowser inception! Wasn't disappointed it didn't work. :>

zernoshka | 22 hours ago

Yep, I even tried copy and pasting and clicking on this link on the front page of HN.

codetiger | 21 hours ago

Tried it and got disappointed. Wanted to try a few levels recursive. But why?
Really enjoyed this section: "Agents love tinybrowser!"

Thank you for the laughs

catchmeifyoucan | 23 hours ago

This looks really cool.

Are there any memory benefits of using this to render a page?

thatsabadlook | 23 hours ago

Let's think this through. Does running a web browser help performance of applications that would otherwise run on ones computer? No. Does putting another browser inside of a browser improve anything inside of a browser? Also no

catchmeifyoucan | 19 hours ago

Hmm, I think the whole browser-in-browser thing is a demo to prove the portability. I believe you can run this as a standalone rust application.

And it might be possible. If the page doesn't load the full V8 engine, renders the DOM in its own way, skips interactivity, I don't see why it may not use less memory. I don't know their approach.

catapart | 23 hours ago

This is my favorite kind of ridiculous. An impressive project, you've got here!

fitzn | 23 hours ago

I didn't read the source, but how does this fetch across origins? Presumably the wasm browser gets its networking from the host page's fetch function. But fetch won't return any arbitrary page.

nes350 | 22 hours ago

fitzn | 13 hours ago

Thank you!

koolala | 22 hours ago

They are proxying sites through their server at https://tinybrowser.ericc.ch/api/hop

fitzn | 13 hours ago

Thank you!

tomaskafka | an hour ago

Excellent! So it can be used to spoof websites - if I can show you a tiny browser version of your banking, I won.

petermcneeley | 22 hours ago

You have failed the compute science community by not allowing recursion.

endworkai | 21 hours ago

Yes, I also grabbed their URL and tried to paste it in!
The birth and death of javascript came true!

https://www.destroyallsoftware.com/talks/the-birth-and-death...

rickcarlino | 20 hours ago

Can’t have browser compatibility issues if you run a different browser in the users browser.

fnord77 | 20 hours ago

you cannot open https://tinybrowser.ericc.ch/ in it lol

alfanick | 10 hours ago

Wrap it in unkernel, go as deep as you want /s

zergrush | 20 hours ago

also done over at https://pcbang.io

roschdal | 18 hours ago

PufPufPuf | 18 hours ago

mhmd4k | 17 hours ago

What will be the next project? Micro browser? A browser that runs directly in Tinybrowser?

robin_sohn | 16 hours ago

Can you run Excel in it ?

helloKingBryan | 15 hours ago

Are the data logs kept on your server?

bobnik | 13 hours ago

Can you run PowerPoint in it?

pipkin | 13 hours ago

It aint working currently...
could it bring back the old reddit frame thing? you know comments on the left side, website on the right

nicoburns | 12 hours ago

Looks like this is built on Blitz (https://github.com/DioxusLabs/blitz), the web engine I have been working for the last 3 years.

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)

mrmckizzle | 9 hours ago

Thanks this is pretty neat! I've got it starred now

daugasauron | 11 hours ago

https://slopshare.dev/v0.1.9/ladybird-browser/

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"