K
K
kos_dev2017-09-01 12:57:34
Browsers
kos_dev, 2017-09-01 12:57:34

How to create a browser in C# or C++?

Hello.
I really wanted to write my own browser, with my own chips, etc. So, I tried to use the standard WForms component, but it uses the IE core, which is also outdated.
I tried to use CefSharp, which works with Chromium, but eats more RAM than I would like.
So, I would like to know how to write my own kernel, if you know books on these topics, some examples, articles or lessons - I will be extremely grateful to you.
* If this is not possible to implement in C#, then I will be glad to see the same books, lessons, examples and articles in C ++.

Thank you all in advance for your replies.

Answer the question

In order to leave comments, you need to log in

8 answer(s)
A
Alexander Ananiev, 2017-09-01
@SaNNy32

Writing a browser is a lot of work. Download the sources of the Chromium browser and see how many lines of code there are. Even if you write one line of code every second, then it will take at least a couple of years to write such a number of lines. And still it is necessary to debug everything, to write tests. This is not lifting work for one person.

A
asd111, 2017-09-01
@asd111

Use blink. www.chromium.org/blink
The Qt framework has a qt web engine based on blink doc.qt.io/qt-5/qtwebengine-index.html
Or read the blink sources https://chromium.googlesource.com/chromium/ blink/+... This is a fork of the webkit that runs the current chrome.

S
SolidMinus, 2017-09-01
@SolidMinus

UPD: the message is truncated... for some reason
UPD2: Protection against cross-site-scripting, because of the block
outside the code, it removed part of the message................

People, what are you ? The author did not say that he would code it. IMHO, he wonders how it's done. Did I get it right?
To make the core for the browser, you need to go from zero itself:
0. Requests to the network. Implementation of the http protocol. Fasten SSL / TLS later and it will be https.
1. Domain parsing. parse domain_name:port, make a DNS query to resolve the domain, and specify host:domain_name in the http headers, connect to port. It can be different from the 80th, for example.
2. Render html. You write an html parser engine that distributes elements across the screen. If a script block is encountered, it passes to the appropriate language interpreter, for example, javascript.
3. Make feedback with the user. If he clicks on a button on the screen, then you need to match this button with where it leads. Then make a request to that page and get a response.
total we have:
* Analyzer html / css, graphics rendering.
* An interpreter of at least javascript
As a result - your own browser, it's even more difficult than your own programming language interpreter ... yes ... Therefore, if you decide to make your browser from scratch, it's better to make a programming language :)))))))

L
Legebocker, 2017-09-01
@EnDeRJaY

Lord, have you collapsed from Google? Of course, you can write in C # or C ++ browser, but no one guarantees that you will not jump out of the window in a month. By the way, what is your floor?
Better learn C ++ more, then practice on something, find supporters and maybe you will get something. Of course, it will not be a Chrome killer, and even an Explorer, but there will already be something

L
lastmac, 2017-09-04
@lastmac

As a person who creates his own browser.
You need to "smoke" specifications, and there are quite a few of them:
HTML, DOM, Encoding, URL and more
CSS and modules
Fonts
, web, js and a bunch of other things ...
But, most importantly, you need to understand why you need to write your own browser / core? !
This is not a simple matter, the browser is a set of many technologies and the complexity of writing it is appropriate.

#
#, 2018-04-27
@mindtester

watch and peep on the same jit 1,048 repository results

D
Derevyanko Alexander, 2017-09-01
@dio4

link
and more here

M
Mr.Ivan, 2021-12-04
@holmssherlok0808

It’s possible to create a simple browser without any jokes. YES, but you should have vs if you don’t have it, then back-breaking work .... Well, if there is, then just google the browser in c # and that’s it, there is more info.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question