Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Well break it down into pieces. What is a Web browser? What does it do? It:</p> <ul> <li><strong>Fetches external content.</strong> So you need a HTTP library or (not recommended) write this yourself. There's a lot of complexity/subtlety to the HTTP protocol eg handling of expires headers, different versions (although it's mostly 1.1 these days), etc;</li> <li><strong>Handles different content types.</strong> Theres a Windos registry for this kind of thing that you can piggyback. I'm talking interpreting content based on MIME type here;</li> <li><strong>Parses HTML and XML</strong>: to create a DOM (Document Object Model);</li> <li><strong>Parses and applies CSS</strong>: this entails understanding all the properties, all the units of measure and all the ways values can be specified (eg "border: 1px solid black" vs the separate border-width, etc properties);</li> <li><strong>Implements the W3C visual model</strong> (and this is the real kicker); and</li> <li><strong>Has a Javascript engine</strong>.</li> </ul> <p>And that's basically a Web browser in a nutshell. Now some of these tasks are incredibly complex. Even the easy sounding ones can be hard. Take fetching external content. You need to deal with use cases like:</p> <ul> <li>How many concurrent connections to use?</li> <li>Error reporting to the user;</li> <li>Proxies;</li> <li>User options;</li> <li>etc.</li> </ul> <p>The reason I and others are colletively raising our eyebrows is the rendering engine is hard (and, as someone noted, man years have gone into their development). The major rendering engines around are:</p> <ul> <li><strong>Trident:</strong> developed by Microsoft for Internet Explorer;</li> <li><strong>Gecko:</strong> used in Firefox;</li> <li><strong>Webkit:</strong> used in Safari and Chrome 0-27;</li> <li><strong>KHTML:</strong> used in the KDE desktop environment. Webkit forked from KHTML some years ago;</li> <li><strong>Elektra:</strong> used in Opera 4-6;</li> <li><strong>Presto:</strong> used in Opera 7-12;</li> <li><strong>Blink:</strong> used in Chrome 28+, Opera 15+, webkit fork;</li> </ul> <p>The top three have to be considered the major rendering engines used today.</p> <p>Javascript engines are also hard. There are several of these that tend to be tied to the particular rendering engine:</p> <ul> <li><strong>SpiderMonkey:</strong> used in Gecko/Firefox;</li> <li><strong>TraceMonkey:</strong> will replace SpiderMonkey in Firefox 3.1 and introduces JIT (just-in-time) compilation;</li> <li><strong>KJS:</strong> used by Konqueror, tied to KHTML;</li> <li><strong>JScript:</strong> the Javascript engine of Trident, used in Internet Explorer;</li> <li><strong>JavascriptCore:</strong> used in Webkit by the Safari browser;</li> <li><strong>SquirrelFish:</strong> will be used in Webkit and adds JIT like TraceMonkey;</li> <li><strong>V8:</strong> Google's Javascript engine used in Chrome and Opera;</li> <li>Opera (12.X and less) also used its own.</li> </ul> <p>And of course there's all the user interface stuff: navigation between pages, page history, clearing temporary files, typing in a URL, autocompleting URLs and so on.</p> <p>That is a <strong>lot</strong> of work.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload