Writing a web browser
Writing a web browser
I thought that it would be really cool to write a web bowser. I know that it would be quite dificult, and I would probably not make anything that renders more than a text-only web page, but can anyone suggest any tutorials? I tried searching Google, but got no results.
Thanks in advance,
-Stephen
Thanks in advance,
-Stephen
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Writing a web browser
socket programming (whatever the language)
HTTP specifications (RFC 2616)
that should keep you busy for a moment ...
Make sure you retrieve the _official_ HTML specifications at W3, too ... not some approximate stuff that could be browser-specific
HTTP specifications (RFC 2616)
that should keep you busy for a moment ...
Make sure you retrieve the _official_ HTML specifications at W3, too ... not some approximate stuff that could be browser-specific
Re:Writing a web browser
What do you think would be the best landuage to write one in? I was thinking C++ or C#, in windows.
-Stephen
-Stephen
Re:Writing a web browser
Should both work fine, just depends on where you are more experienced. I can think of some browsers written in C, C++ and even Java.Steve the Pirate wrote: What do you think would be the best landuage to write one in? I was thinking C++ or C#, in windows.
cheers Joe
Re:Writing a web browser
You might also be interested in looking into this if you want to remove a lot of the grunt work from it.
Re:Writing a web browser
I would do the same as, i do with all new projects, that there is little or no info on, which is start at the very basic and work your way up.
In this case, i would make the simplest web page ( a hello world! web page) and make a simple offline browser to display it, wait untill you have a good offline html browser before moving to tcp/ip etc.
This is the way i will make a web browser for my OS.
In this case, i would make the simplest web page ( a hello world! web page) and make a simple offline browser to display it, wait untill you have a good offline html browser before moving to tcp/ip etc.
This is the way i will make a web browser for my OS.
Re:Writing a web browser
That's a different approach than I was going to take. I was thinking of making an application that could download HTML files from the internet, and then writing the code to render it. As your way is probably better, thats the route I am going to take.
-Stephen
-Stephen
Re:Writing a web browser
best socket tutoial: http://beej.us/guide/bgnet/
works with unix, and with very very little change works with windows
p.s. with windows link to ws2_32.lib
works with unix, and with very very little change works with windows
p.s. with windows link to ws2_32.lib
Re:Writing a web browser
Simple and dirty:
sed -e 's/\n//g' -e 's/\<br\>/\n/g' -e 's/\<.*?\>//g' <file.html | less
Explanation: remove newlines, replace <br> with newline, remove all <...> thingies, output to scroller.
sed -e 's/\n//g' -e 's/\<br\>/\n/g' -e 's/\<.*?\>//g' <file.html | less
Explanation: remove newlines, replace <br> with newline, remove all <...> thingies, output to scroller.
Re:Writing a web browser
In the Cocoa dev environment on OS X, you can do this without touching a line of code by just making the right connections in the interface.
Okay, seriously, what these other guys said.
Okay, seriously, what these other guys said.
Re:Writing a web browser
If you're looking for example code, try 'links'. It's a full-fledged browser for console or framebuffer. No frills.
Every good solution is obvious once you've found it.
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Writing a web browser
cool stuff. and maybe that's my next endeavour, once the Network stack is in a useable state
I've always thought, the web controls are drawn by merely placing ui library provided controls - except of the table drawing stuff. This alone is one file for itself. Boah. Pretty advanced stuff. Well, I'm gonna extract all the nifty algorithms. *fg*
As it looks like in links, that's drawing custom controls on a drawing board and adding handling stuff to them.
Stay safe
I've always thought, the web controls are drawn by merely placing ui library provided controls - except of the table drawing stuff. This alone is one file for itself. Boah. Pretty advanced stuff. Well, I'm gonna extract all the nifty algorithms. *fg*
As it looks like in links, that's drawing custom controls on a drawing board and adding handling stuff to them.
Stay safe
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:Writing a web browser
Correct, as links is intended to be run from the console. No X, no toolset.beyond infinity wrote: As it looks like in links, that's drawing custom controls on a drawing board and adding handling stuff to them.
Every good solution is obvious once you've found it.