Custom Web Browser

Hi, Guys so i'm stuck in a situation. I NEED HELP. ive came up with an idea that INVOLVES me creating a fully custom web browser FROM SCRATCH. Yes this will be one of the most difficult projects for me. Im still learning C++ as i wouldnt call myself an expert. im just past a beginner but i wanted to start planning my project on paper as i continue to learn C++. THE QUESTION IS: What are all the languages needed to build a fully custom web browser like Safari, IE, Chrome ect. Let me remind you FROM SCRATCH!!! Like if somebody could just reply with
EVERYTHING they know about what it takes to build a browser. I'm willing to take all the advice i can get. Thanks in advance.!!!
1. Can it be done using just an implementation of HTTP?
2. Can it be done by writing a plugin/add-on for an existing browser?
3. Can it be done by combining an existing browser and an input automation language or some time of macro language?
4. Can it be done by modifying an existing browser?

If the answer to all four questions then there's a very good chance that you're approaching problem the wrong way. A web browser is a piece of software that solves a fairly specific problem; that of presenting web content in a humanly comprehensible way.
if the answer to all four questions is what? and also the web browser is only part of my project just fyi
Last edited on
Sorry, that was a typo. I meant to say "if the answer is 'no'".

and also the web browser is only part of my project just fyi
Modern web browsers are extremely complex beasts. For example, one source (https://www.openhub.net/p/firefox ) quotes Firefox as consisting of 12.3 megalines of code between C++, C, and JavaScript. The same source states Chromium consists of 15.8 MLoCs. For reference, the Linux kernel consists of 17 MLoCs.
I don't know what the rest of the project is about, but chances are the browser bit is going to dwarf it.
Last edited on
Why do you need to customise a web browser? You might be better off just plugging in another web-browser into your application (if you need one bundled with it). What functionality does your web browser need that no-one else's has?
Check out WebKit for some ideas.

Webkit is an engine used for rendering webpages. It has been used in Opera, Safari, Chrome, Kindle e-Book reader, iOS default browser, PS3, Steam gui, and other stuff. Google recently forked it to something called "Blink" which may also work for you.

It's flexible and powerful with a C++ API. If you're really going completely from scratch, then you are really limited to only using the OS API. I think that's unreasonably limited and you'll end up producing something that is unsuitably basic. Check this out, run through some tutorials, and see if you think it provides a tool that you can use. It may give you the boost you need to do something productive.

You're question about which languages are important is interesting. If you're using WebKits, then you want to know C++. Most HTTP stuff is done in HTML. If you use a pre-existing HTML parser (which I suggest) then you don't need to learn the language itself, if you're building your own parser, then you'll want to learn HTML.

Of course, lots of other languages are used too. JavaScript is one of the most useful languages. While it's certainly a good language to know, you probably won't be parsing it. Instead, you'll need to recognize when you receive a JavaScript packet and invoke a new Java VM or pass the script to an existing VM.

Same thing with Adobe Flash. It uses a protocol which you need to recognize and send to a Flash player. You could either include Flash as part of your distribution, or enable plugins to make this more flexible.

So when you say FROM SCRATCH I'm not sure what your scope is. The Flash protocol is closed-source. If you want the user to be able to watch youtube, you'd either need to reverse engineer Adobe Flash or use libflashplayer.so which is a 3rd party lib. I think the first option is unreasonable and possibly illegal.
Last edited on
Topic archived. No new replies allowed.