View Full Version : Creating a web browser?
Treefingers.s
11-11-2009, 12:23 AM
I'm wondering what languages I should use to create my very own web browser.
So far I've been with JavaScript.
Any ideas? :)
cense
11-11-2009, 05:34 AM
Do you mean you're going to write a UI and parsing engine for both HTML and Javascript? Big task.
Decide if you're interested in cross-platform or not. Once your platform scope is defined, you can choose a language that suits the the rest of your needs from various points like how familiar you are with a language and what kind of optimizations you want to get into vs. how much abstraction you want (of course, this is often times not necessarily dictated by the language despite any specific tendencies).
Also, consider how many existing frameworks you want to use. Are you going to write a parser for both HTML and Javascript from the ground up? That's a nutty task. Are you going to use an existing rendering framework like WebKit?
Ed Lister
11-11-2009, 05:35 AM
http://www.makeyourownbrowser.com/downloads/
Treefingers.s
11-11-2009, 05:40 AM
Do you mean you're going to write a UI and parsing engine for both HTML and Javascript? Big task.
Decide if you're interested in cross-platform or not. Once your platform scope is defined, you can choose a language that suits the the rest of your needs from various points like how familiar you are with a language and what kind of optimizations you want to get into vs. how much abstraction you want (of course, this is often times not necessarily dictated by the language despite any specific tendencies).
Also, consider how many existing frameworks you want to use. Are you going to write a parser for both HTML and Javascript from the ground up? That's a nutty task. Are you going to use an existing rendering framework like WebKit?
Hmm... I'm not too informed about the whole thing, but I still want to continue doing this with just JavaScript and HTML.. maybe others but I'm guessing I'll write a parser for both HTML and Javascript, and I have a friend who's also helping out so we'll get it done much quicker.
Since my friend is a machomo, I'm going to make it for windows and mac.
Do you have any recommendations to where I can be more informed about this subject?
http://www.makeyourownbrowser.com/downloads/
I'd like to try that out, but I want to be able to make my own web browser.
Thanks, but no thanks.
pygar
11-11-2009, 06:27 AM
before you begin. consider: is it worth it?
you have KHTML, Webkit, gecko, trident as credible rendering engines.
https://wiki.mozilla.org/Prism
maybe prism is suitable to your needs.
Aragami
11-11-2009, 07:32 AM
Wait on a second...
You want to write a web browsing program in HTML and Javascript?
Treefingers.s
11-11-2009, 05:51 PM
Wait on a second...
You want to write a web browsing program in HTML and Javascript?
Yeah lol We know it might take a while but if there's a way we'll go for it.
Raziel
11-11-2009, 05:52 PM
Yeah lol We know it might take a while but if there's a way we'll go for it.
That comment went right over your head.
Bong McPuffin
11-11-2009, 06:09 PM
Yeah lol We know it might take a while but if there's a way we'll go for it.
Learn C++... you can program ANYTHING in it.
Animal Farm Pig
11-11-2009, 06:15 PM
Qt4 has a WebKit widget. Use some language with Qt4 bindings.
Treefingers.s
11-11-2009, 06:39 PM
Learn C++... you can program ANYTHING in it.
I was going to learn it, but Idk. I have an ebook to teach me but I don't really know how long it will take me to get to the part (not in the book) that will make me understand how to make one.
Qt4 has a WebKit widget. Use some language with Qt4 bindings.
Idk I'm not too knowledgeable about all of this.
Raziel
11-11-2009, 08:15 PM
Visual basic is very simple. And I could teach you how to make a web browser in less then an hour.
Treefingers.s
11-11-2009, 08:34 PM
Visual basic is very simple. And I could teach you how to make a web browser in less then an hour.
Teach me? I need some experience.
Bong McPuffin
11-11-2009, 09:15 PM
I was going to learn it, but Idk. I have an ebook to teach me but I don't really know how long it will take me to get to the part (not in the book) that will make me understand how to make one.
Idk I'm not too knowledgeable about all of this.
Programming isn't something you can just pick up and learn in 3 days and start making kick-ass applications. Infact, I doubt you could even make a text adventure in under a week (with no prior experience, real programmers don't count)
Treefingers.s
11-11-2009, 09:19 PM
Programming isn't something you can just pick up and learn in 3 days and start making kick-ass applications. Infact, I doubt you could even make a text adventure in under a week (with no prior experience, real programmers don't count)
Umm, I actually know some other programming languages, dude.
JavaScript is pretty easy, I'm just kind've lazy to keep learning it.
The things I'm not knowledgeable about are the steps to making a web browser and what you need.
WebBrowser1.GoBack
WebBrowser1.GoForward
WebBrowser1.Refresh
WebBrowser1.Navigate Text1.Text
There ya go, you have a fully functional web browser.
Treefingers.s
11-11-2009, 09:23 PM
WebBrowser1.GoBack
WebBrowser1.GoForward
WebBrowser1.Refresh
WebBrowser1.Navigate Text1.Text
There ya go, you have a fully functional web browser.
Oh yes, like I'm just gonna write 4 lines of gibberish.
I'm not fucking stupid, retard. You're a moderator right? Could you get your shit straight or get the fuck out of here? Fucking pansy.
Oh yes, like I'm just gonna write 4 lines of gibberish.
I'm not fucking stupid, retard. You're a moderator right? Could you get your shit straight or get the fuck out of here? Fucking pansy.
Clearly you're not very smart. I just gave you 4 lines of code for a working web browser in VB.
Get the sand out of your vagina before replying like a whiny little bitch.
PS: Good luck writing that web browser in HTML/JS. :rofl:
Treefingers.s
11-11-2009, 09:31 PM
Clearly you're not very smart. I just gave you 4 lines of code for a working web browser in VB.
Get the sand out of your vagina before replying like a whiny little bitch.
I'm saying I don't want anything small. I'm thinking about making one at most equal to opera.
I don't know how I'm going to do that with 4 lines of text. I don't even... Fuck. Can we keep this JavaScript? My friend will probably quit if he has ot learn something else. I don't feel like doing it all by myself.
Treefingers.s
11-11-2009, 09:33 PM
PS: Good luck writing that web browser in HTML/JS. :rofl:
Ok, thanks. I'm pretty sure I didn't know what the fuck to do in the first place. I just threw the idea out of no where to my friend and he wanted to do it.
I don't see why not, right?
PS: When I make it (I fucking will), you'll stfu.
PSS: I hope you don't wear those kinds of shoes for show.
Ok, thanks. I'm pretty sure I didn't know what the fuck to do in the first place. I just threw the idea out of no where to my friend and he wanted to do it.
I don't see why not, right?
PS: When I make it (I fucking will), you'll stfu.
PSS: I hope you don't wear those kinds of shoes for show.
You do not make a web browser in HTML/JS, plain and simple, dumbass.
As Raziel previously stated, yet you ignored, you can make a web browser in visual basic very easily. I PROVIDED YOU WITH THE CODING TO MAKE A VERY MINIMAL WEB BROWSER IN VISUAL BASIC. You did not listen, because you my friend are a fucking idiot.
Treefingers.s
11-11-2009, 09:39 PM
You do not make a web browser in HTML/JS, plain and simple, dumbass.
As Raziel previously stated, yet you ignored, you can make a web browser in visual basic very easily. I PROVIDED YOU WITH THE CODING TO MAKE A VERY MINIMAL WEB BROWSER IN VISUAL BASIC. You did not listen, because you my friend are a fucking idiot.
I don't care if I do not make a web browser in HTML/JS, I'm going to fucking do it.
Did you see my fucking reply to his post?
I don't care if I do not make a web browser in HTML/JS, I'm going to fucking do it.
Did you see my fucking reply to his post?
You really just don't get it...please kill yourself :facepalm:
You don't "code" a web browser in JavaScript, smart guy. JavaScript is akin to HTML in that it is what displays what you see on the screen - i.e. it is the code that is on the website itself, not the code that runs the browser.
To program a web browser, you will need to learn C++ (or C, or Visual C#), Python, Visual BASIC, or some other programming language.
You will also need to do some studying on the subject on your own time, no one here is going to walk you step by step from "Hello, World!" to creating a fully functional web browser. Learning to code something that complex from scratch is something that takes many months, if not years, of studying computer languages. Hell, I've been studying C++ for well over 3 years now and I doubt I could pull it off.
Treefingers.s
11-11-2009, 09:47 PM
You really just don't get it...please kill yourself :facepalm:
Oh, sorry if I don't get it. I'm obviously oblivious to what you mean :rolleyes:
Animal Farm Pig
11-11-2009, 09:47 PM
I don't care if I do not make a web browser in HTML/JS, I'm going to fucking do it.
http://www.stitthappens.com/images/random/infinite-recursion.jpg
Treefingers.s
11-11-2009, 09:48 PM
You don't "code" a web browser in JavaScript, smart guy. JavaScript is akin to HTML in that it is what displays what you see on the screen - i.e. it is the code that is on the website itself, not the code that runs the browser.
To program a web browser, you will need to learn C++ (or C, or Visual C#), Python, Visual BASIC, or some other programming language.
You will also need to do some studying on the subject on your own time, no one here is going to walk you step by step from "Hello, World!" to creating a fully functional web browser. Learning to code something that complex from scratch is something that takes many months, if not years, of studying computer languages. Hell, I've been studying C++ for well over 3 years now and I doubt I could pull it off.
I already know C, so I guess I should start from there. Thanks for letting me know, I guess where ever I started learning JS/HTML isn't a really in depth explainer to what "Browser Script" is.
Treefingers.s
11-11-2009, 09:51 PM
http://www.stitthappens.com/images/random/infinite-recursion.jpg
I didn't have a reason to quit because I didn't know why I was supposed to. I'm not going to quit anything else.
Well, I'll get ready and etc.
Animal Farm Pig
11-11-2009, 09:56 PM
I didn't have a reason to quit because I didn't know why I was supposed to. I'm not going to quit anything else.
Well, I'll get ready and etc.
Comment
^
|
|
|
|
|
|
Your head
Treefingers.s
11-11-2009, 10:01 PM
Comment
^
|
|
|
|
|
|
Your head
Dude, you gotta know when to quit.
I already know C, so I guess I should start from there. Thanks for letting me know, I guess where ever I started learning JS/HTML isn't a really in depth explainer to what "Browser Script" is.
No problem dude.
Try http://www.w3schools.com/ for tutorials on JavaScript and HTML. As for coding the framework for a browser, I can't help you. People on the ##C++ and ##C (I think) channels on Freenode (irc://irc.freenode.org:6667) should be able to help you with some of the more advanced stuff.
I'd try to help but my brain might explode. :p
Treefingers.s
11-11-2009, 10:05 PM
No problem dude.
Try http://www.w3schools.com/ for tutorials on JavaScript and HTML. As for coding the framework for a browser, good luck on that. If I tried to do that my brain might explode. :p
I am actually learning from w3schools right now, dude. Seems as though you are the only person to atleast provide details and help in your posts.
Gosh, I feel horrible since I've never really tried or stayed with something longer than 2 seconds.
Can I ask you for one more favor? Can you tell me what exactly I need and a web page that shows the structure/etc?
That's all I need and then I'll pwn you motherfuckers.
Axiom
11-12-2009, 12:23 AM
You can make a web browser in JS.
In theory:
1) Run your "Browser JS" from the command line.
2) First you have to send the URL to a local file.
3) The local file (HTML Frameset, or perl, php whatever if you know it) acts as a proxy to retrieve the remote file by passing the XSS restriction on javascript.
4) Write your module to parse the response code, removing tags etc.
5) Print the text back to console.
At this stage it would be a text browser like the old school unix browsers:
http://upload.wikimedia.org/wikipedia/en/thumb/d/d5/Lynx-wikipedia.png/800px-Lynx-wikipedia.png
6) Write the logic to "click on links". There's going to be numerous problems to solve throughout the project but between your OS and javascript you should be able to find a solution.
This is where I'd stop but since you want to pwn us motherfuckers.
7) Then begin your code on rendering the file as an image instead of text. You can save the image as a file and have console open it up. But then you're going to need some further hacks it hook the mouse clicks on links etc. It's a big job, but not impossible...
Can you tell me what exactly I need and a web page that shows the structure/etc?
That's all I need and then I'll pwn you motherfuckers.
Honestly, I'm doubtful you have the patience for this project...
Some Resources:
http://www.thefrontside.net/blog/learning_javascript_from_the_command_line
http://stackoverflow.com/questions/319065/cross-domain-ajax-request-from-within-js-file
http://www.devarticles.com/c/a/JavaScript/JavaScript-Remote-Scripting-Reading-Data-From-the-Server/1/
Agent 008
11-12-2009, 12:28 AM
You can write a browser in html and javascript. Then you can use the new browser to run itself.
jd123
11-12-2009, 12:46 AM
public class Browser {
private int bWidth;
private int bHeight;
private String hPage;
public Browser() { bWidth = 400; bHeight = 500; hPage="http://java.com"}
public Browser(int width, int height, int homepage) {
this.bWidth = width;
this.bHeight = height;
this.hPage = homepage;
}
public void navWeb(int url) {
window.location= url;
}
public void back() {
window.location-1;
}
public void close() {
window.close=true;
}
}
public class Main {
public static void Main(String[] args) {
Browser myBrowser = new Browser(800, 800, "Http://google.com);
myBrowser.navWeb(//yourwebsitehere);
}
}
Treefingers.s
11-12-2009, 12:52 AM
So they finally come out of their caves, huh? Thanks guys. I'm gonna do this.
Aragami
11-13-2009, 01:38 AM
Treefingers, you don't seem to realise that everyone in this thread was trying to help you, but you just want to flame them if they seem the least bit derogatory.
Treefingers.s
11-13-2009, 01:44 AM
Treefingers, you don't seem to realise that everyone in this thread was trying to help you, but you just want to flame them if they seem the least bit derogatory.
You obviously didn't read most of my posts, and you obviously have no idea of what's going on.
lolocaust
11-13-2009, 01:59 AM
this thread = :facepalm:
a webbrowser itself is pretty simple, you can make a very minimal UI pretty quickly (say, using webkit). Coding your own html/javascript parser, though, is a completely different animal. Writing a javascript intepreter in javascript is just dumb.
anyway if you're serious, here's a really basic browser that could get you started:
http://www.uzbl.org/
webkit is the shit anyway, I don't know why you wouldn't wanna use it.
@Axiom: people still use text browsers all the time, I use links every now and again to look up documentation and stuff occasionally
Treefingers.s
11-13-2009, 02:09 AM
this thread = :facepalm:
a webbrowser itself is pretty simple, you can make a very minimal UI pretty quickly (say, using webkit). Coding your own html/javascript parser, though, is a completely different animal. Writing a javascript intepreter in javascript is just dumb.
anyway if you're serious, here's a really basic browser that could get you started:
http://www.uzbl.org/
webkit is the shit anyway, I don't know why you wouldn't wanna use it.
@Axiom: people still use text browsers all the time, I use links every now and again to look up documentation and stuff occasionally
I'm gonna need linux for that.
Idk about it. I'll download linux and try it out some time later, because right now I'm doing something. I'll use WebKit later on, but Idk about my friend, he knows how to make UIs and whatnot, but he does it in a different OS (:facepalm:) but it's all good.
I guess I'll do it by myself for experience first?
I am actually learning from w3schools right now, dude. Seems as though you are the only person to atleast provide details and help in your posts.
Thanks :) I try to be helpful, unlike a majority of the user base here at zoklet that do nothing but flame and contribute nothing... you know who you are people :hrmph:
Gosh, I feel horrible since I've never really tried or stayed with something longer than 2 seconds.
yeah I have the same problem, I guess we have short attention spans. I got really close actually to finishing a completely-customizable text-based battle game called "T3xt", in which you can write your own monster files, item files, spell files, and so forth, and right as i was about to finish the AI, my hard drive failed, and the last backup I had was months ago with barely anything done. :facepalm:
Can I ask you for one more favor? Can you tell me what exactly I need and a web page that shows the structure/etc?
That's all I need and then I'll pwn you motherfuckers.
i am kind of stoned off my ass right now so it would be extremely difficult to do anything useful other than consume your food and give you an insightful philosophy to life, i will try to get back to you later when i am in a perhaps less intoxicated state
Jitsu6500
11-13-2009, 02:12 AM
I'm wondering what languages I should use to create my very own web browser.
So far I've been with JavaScript.
Any ideas? :)
You want to make your own browser using Javascript? Lolk.
Treefingers.s
11-13-2009, 02:15 AM
Thanks :) I try to be helpful, unlike a majority of the user base here at zoklet that do nothing but flame and contribute nothing... you know who you are people :hrmph:
yeah I have the same problem, I guess we have short attention spans. I got really close actually to finishing a completely-customizable text-based battle game called "T3xt", in which you can write your own monster files, item files, spell files, and so forth, and right as i was about to finish the AI, my hard drive failed, and the last backup I had was months ago with barely anything done. :facepalm:
i am kind of stoned off my ass right now so it would be extremely difficult to do anything useful other than consume your food and give you an insightful philosophy to life, i will try to get back to you later when i am in a perhaps less intoxicated state
Ok, thanks. Right now I'm still contemplating about it, and wondering how I make the browser first. The rest is gold, but I just need to know how to make the browser... I have javascript enabled in cmd, but I do not know the script/I do not have the knowledge of what I'm supposed to write due to me being a beginner.
As for the short attention span, yeah. I can't even finish a full sentence without getting frustrated and looking back and forth to zoklet to see if any lulzy posts were posted :(
Sadly, there usually isn't any lulzy posts posted :(
Raziel
11-13-2009, 06:28 AM
Dude, hit me up on IM.
Axiom
11-13-2009, 07:02 AM
@Axiom: people still use text browsers all the time, I use links every now and again to look up documentation and stuff occasionally
Actually a text browser would be quite easy. The code parser would just strip tags and use a different color for each tag for example all <h2> tags could be orange, <a> tags could be red, all <p> tags in white.
Then parse the SRC attribute from the link tags and store it in an array. Then when you want to click a text link you can do something like this.
# Open the browser
~$> js -f browser.js -f -
# Load Zoklet
~$> browseURL("http://www.zoklet.net");
# Click the second link on the page
~$> clickLink(2);
(The first command is from spiderMonkey's documentation about opening a js file and then dropping into interactive mode. The 2 following commands are functions of the browser script.)
NamelessNom4d
11-14-2009, 01:42 AM
I can write a browser in javascript/HTML so you can run a browser in a browser and browse while you browse! :lol:
lolocaust
11-14-2009, 02:46 AM
lol also, this
http://www.stitthappens.com/images/random/infinite-recursion.jpg
http://www.google.com/search?hl=en&source=hp&q=recursion&aq=f&oq=&aqi=g10
vBulletin® v3.8.1, Copyright ©2000-2013, Jelsoft Enterprises Ltd.