Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Writing a web browser is a major undertaking, depending on the level of functionality you want to include.</p> <p>Things that need to go into a browser:</p> <ul> <li>An <strong>HTTP client</strong> that can retrieve the page content from a server. Java includes something very basic inside java.net, but if you can, use the Apache Commons HTTPClient instead. Many browsers also have support for other protocols, such as ftp:// or local files (file://).</li> <li>An <strong>HTML parser</strong>, which can read the returned HTML (or XHTML) into an in-memory structure. The hard part here is that not only has HTML evolved; there is also a lot of HTML out there that does not conform to any of the multiple HTML standards. People just tend to write something, see if it can be rendered on a specific browser (say, IE), and move on -- and certain browsers can render almost anything. You can use existing parser such as JSoup for this, which also has limited support for fixing mistakes.</li> <li>A <strong>rendering engine</strong>. This would be, for me, the most complex step. You would need really in-depth reading to get any sort of CSS support working (major browsers had a hard time getting it right too), and even non-css rendering such as nested tables or complex forms would imply hard work (to calculate where each page component goes on the rendered page). There are no add-on rendering libraries that I know of, but there is minimal (HTML 3.2?) HTML rendering support inside the JEditorPane - you may be able to use that (forget about advanced CSS, thouth).</li> <li><strong>Scripting support</strong>. This would interpret JavaScript, and make your pages interactive. You can use Rhino for that (maintained by the folks at Mozilla, and very powerful).</li> </ul> <p>(Plus internal caching to avoid making repeated requests; support for saving pages to files; support for 3rd party plugins/extensions such as Flash; security considerations to avoid cross-site scripting attacks on your users ... there are many more components or concerns that I have not bothered to include above).</p> <p>Since you have only basic understanding of Java, and any of the above components are fairly complex projects in their own right, I would suggest choosing another project or delimiting a very small subset of what a commercial web browser does to try to implement <em>that</em> instead.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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