What's the difference between a browser engine and rendering engine?

前端 未结 2 462
粉色の甜心
粉色の甜心 2021-02-06 12:07

I found some similar questions but they do not fully respond to the one I have, here is the list that I hope will help someone else:

What\'s the difference between a bro

2条回答
  •  忘了有多久
    2021-02-06 12:28

    I don't know how to explain in terms of "Engine". Let me explain by using the keyword "process" in the context of chromium browser which has multi-process architecture.

    Browser process : Main browser process that manages renderer processes

    Renderer process : Basically a tab (in chromium)

    In order to prevent the entire browser to crash or compromise the host system, due to a malicious web content, a separate process is delegated with the handling of the web content for each request. This separate process is the Renderer process (tab process), which do not have user privileges (i.e, limited access to OS system calls).

    When one requests for a web site, the render process forwards the request to the browser process which in-turn makes the network calls for the website. After the arrival of the web content, the browser process sends the content to the renderer process. The renderer process parses the HTML,CSS fils, prepares the DOM, maintains the JS run time (V8 instance) and sends the content as a bitmap format to the browser process for displaying it on the UI.

    The browser process treats the renderer process as a black box and expects the web content in a certain format from the renderer process. This conversion of web content to the required format includes several sub-components of which layout engine (process) is one.

    So, Browser process handles the user privileged resources/requests like access to filesystem, network etc. where as the sandboxed Renderer process is responsible for converting the web pages to a format that browser-process can put it to display in a OS native window manager.

    I wonder why the layout engine is named as the browser engine. The above mentioned Browser process is different from Browser-Engine (Layout engine). I have not explored the layout engine yet.

    References : https://seclab.stanford.edu/websec/chromium/chromium-security-architecture.pdf

提交回复
热议问题