Fog Creek Software
Discussion Board

Making my own browser

Just wondering how hard it would  be to make my own browser.  Just a basic browser that would download an HTML page and display it... More difficult than it seems eh?

Laura Gatisun
Saturday, June 19, 2004

This interview by one of the Mozilla developers can give a tip on how difficult it is:

Yes, I think it's very difficult if you intend to use it to browse anything but your tested pages.

Saturday, June 19, 2004

Parsing and rendering HTML is not easy although you can just use the WebBrowser control but that would be cheating ;-)

Saturday, June 19, 2004

What operating system and what rendering engine should it be based on?
For example, in OS X you can create a simple web browser with no coding using the free developer tools.

Rhys Keepence
Saturday, June 19, 2004

"Parsing and rendering HTML is not easy although you can just use the WebBrowser control but that would be cheating ;-)"

And that's a common practice. On Windows, there are probably only two types of browsers: IE-based and Gecko-based.

Green Pajamas
Saturday, June 19, 2004

Okay, I actually meant majority of them. I know Opera is on its own. :)

Green Pajamas
Saturday, June 19, 2004

I think you should do it.

This may sound crazy (actually, it is crazy), but I think you should build a browser.

Not a normal browser, mind you. Not a browser that parses and renders HTML pages. (BORING)

Instead, I think it would be an interesting and worthwhile project to design a browser spicifically designed for hosting thin-client applications.

If you've followed much of the discussion here lately, then you've probably seen the website, which emulates ordinary windowing widgets using a clever combination of DHTML and JavaScript. I've put together a few web applications like that (though nowere near as detailed and feature-rich as the oddpost site), and it can be an incredible pain in the ass to develop.

When you're developing a rich GUI in a browser, you're not actually working with a windowing toolkit. You're using tricks and hacks with HTML, CSS, and JavaScript to emulate the object-oriented hierarchy of a decent GUI toolkit.

But what if you had a specific type of application that could connect to a server (using HTTP, or whatever networking protocol you prefer) and retreive the GUI (and some limited client-side logic) for an application that's primarily based on the server. The application would look like a normal fat client application, with a rich set of object-oriented widgets, but it would act like a web application, sending and retreiving its data to the server for processing/storage. It would be easy to deploy (just like web apps). But it would also be easy to use (like ordinary apps).

To be honest with you, I don't think you could finish such a project. But you could do _some_ work on it. And it's an entirely new type of application, so you'd be breaking new ground. That would be interesting and fun, wouldn't it? Even if the application that you end up developing is still somewhat of a prototype.

That's what I think you should work on.

When you finish, send me a check.

Benji Smith
Saturday, June 19, 2004

or just use the mozilla platform. It is exactly what you just described. It includes a windowing toolkit and all the networking stuff you need as XPCOM (cross platform COM) objects written in c++. And a whole lot more.

and it's open source so you can add, change and remove as needed.

fool for python
Sunday, June 20, 2004

> For example, in OS X you can create a simple web browser with no coding using the free developer tools.

O'Reilly has a three-part 'Build Your Own Browser' tutorial on doing this; see

Sunday, June 20, 2004

WxPython gives you everything you need. The demo program that comes with it even includes a couple of browser examples. Check out wxHtmlWindow and WxHtmlParser here:

Tom H
Sunday, June 20, 2004

fool for python said:
> or just use the mozilla platform.

I've heard a few things here and there about building fat-client applications with XUL, but I didn't know it was possible to build thin-client XUL applications. That's pretty cool.

I've even gone to, and added this book to my wish list:

Benji Smith
Monday, June 21, 2004

For any of you delphi programmers,  there is  a delphi component, THTMLViewer,  that is pretty good at rendering html and has CSS functionality.  You can  buy the component that comes w/ source code.  Would be interesting to view the code for the parsing.

Monday, June 21, 2004

I like Benji Smith's idea, but it would be hard to get the resulting product onto desktops.

The real market for this is business and they are really entrenched with IE. If you started selling an alternative "platform" you can bet that MS would use everything they've got to rubbish your attempts.

If you were very lucky, they'd buy you out for a few million dollars and then can the whole idea, wrapping you tightly in NDAs.

You'd need to partner with someone really heavyweight to get it off the ground. Someone like IBM.

Steve Jones (UK)
Tuesday, June 22, 2004

*  Recent Topics

*  Fog Creek Home