Web browser

I want to write simple web browser but i don't know how to do that . I think i must send to server some code and they send me back a html code .Am i right? If yes then what code i must send?
Example request:

1
2
3
GET / HTML/1.1 
Host: www.google.com 


Response:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
HTTP/1.1 302 Found
Location: http://www.google.pl/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Set-Cookie: PREF=ID=0ec19d80024a01e6:FF=0:TM=1294754792:LM=1294754792:S=Pkp3qdphitVdwGro; expires=Thu, 10-Jan-2013 14:06:32 GMT; path=/; domain=.google.com
Set-Cookie: NID=42=KME5bdWAVwhQWKHz8lAtXPrkwBCznVtcb9rUO9th9PrsCGJBWfSY92z-YSEegRRib1KUsT-Z1A-DdkG4vQATImCy1-JZnudylQNbVtQD02miIwLQLtyCLLakrTi67xzY; expires=Wed, 13-Jul-2011 14:06:32 GMT; path=/; domain=.google.com; HttpOnly
Date: Tue, 11 Jan 2011 14:06:32 GMT
Server: gws
Content-Length: 218
X-XSS-Protection: 1; mode=block

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.pl/">here</A>.
</BODY></HTML>







Last edited on
Never mind actually connecting to a server just yet, theres libraries that do that for you that are within easy reach.

Have you considered how you are going to render the actual web pages?

Start off with an engine that renders HTML pages first, then you have a way of testing this actual request when you get a response.

Also, consider the size if the project that you are undertaking, you have to cater for EVERY HTML element and attribute, EVERY CSS style, Javascript... the list goes on and on....
Last edited on
Topic archived. No new replies allowed.