architecture of the web browser

30
Architecture of the Web browser Dr. Sabin Buraga Faculty of Computer Science, UAIC, Romania www.purl.org/net/busaco

Upload: sabin-buraga

Post on 15-Jan-2015

9.257 views

Category:

Technology


2 download

DESCRIPTION

A presentation depicting the most important aspects regarding the internal architecture of a Web browser.

TRANSCRIPT

Page 1: Architecture of the Web browser

Architecture of the Web browser

Dr. Sabin Buraga

Faculty of Computer Science, UAIC, Romania www.purl.org/net/busaco

Page 2: Architecture of the Web browser

Why we should know the general architecture of a Web browser?

Firefox Chrome

MSIE Opera

Page 3: Architecture of the Web browser

user interface

browser engine

rendering engine

net work

JS inter-preter

XML parser

display backend

da

ta p

ersiste

nce

www.html5rocks.com/en/tutorials/internals/howbrowserswork/

Page 4: Architecture of the Web browser

user interface

address bar

back/forward button

bookmarking menu

Page 5: Architecture of the Web browser

browser engine

“bridge” between user interface (UI)

and rendering engine

Page 6: Architecture of the Web browser

browser engine

“bridge” between user interface (UI)

and rendering engine

kernel

plug-ins

extensions

add-ons

Page 7: Architecture of the Web browser

rendering engine

able to render the content available

of the Web – representations of resources

(e.g., HTML documents)

Page 8: Architecture of the Web browser

rendering engine

able to render the content available

of the Web – representations of resources

(e.g., HTML documents)

processing the DOM tree

corresponding to a Web page

by applying the CSS style properties

in order to render information

within a display area – viewport

Page 9: Architecture of the Web browser

rendering engine

includes an interpreter (parser)

depending on the Web document type – DTD

HTML 4

XHTML

HTML 5

www.quirksmode.org

Page 10: Architecture of the Web browser

rendering engine

HTML Html

Element

HTML Body

Element

HTML Paragraph

Element

Text

HTML Head

Element

HTML Title

Element

www.w3.org/DOM/

HTML source (stored in a text file – on server)

DOM tree (in RAM, on client side)

Page 11: Architecture of the Web browser

rendering engine

DOM tree

render tree

Page 12: Architecture of the Web browser

rendering engine

render tree

visual representation – layout

Page 13: Architecture of the Web browser

rendering engine

render tree

visual representation – layout

computing the width of each content block

(width calculation)

decisions regarding line breaking

…and others

Page 14: Architecture of the Web browser

rendering engine

layout

painting

Page 15: Architecture of the Web browser

rendering engine

layout

painting

after painting,

rendering changes could (locally or globally) occur

re-layout and/or re-paint

Page 16: Architecture of the Web browser

rendering engine

Gecko WebKit

Trident Presto

examples:

Gecko (Firefox)

Presto (Opera)

Trident (MSIE)

WebKit (Chrome, Safari, iOS)

Page 17: Architecture of the Web browser

rendering workflow – the Gecko use-case

https://developer.mozilla.org/en/Gecko

Page 18: Architecture of the Web browser

rendering workflow – WebKit

www.webkit.org

Page 19: Architecture of the Web browser

rendering engine

because – usually – CSS styles

do not modify the DOM tree, the rendering process

is not dependent by the loading of CSS files

Page 20: Architecture of the Web browser

rendering engine

the processing is made in a synchronous manner

JavaScript programs must be executed immediately

when the engine spots the JS source-code

(eventually, loaded from an external URL)

Page 21: Architecture of the Web browser

rendering engine

implicitly, the rendering process is stopped

until the JavaScript code is entirely executed

Page 22: Architecture of the Web browser

rendering engine

the rendering process could be optimized

speculative parsing

parallel loading of resources

multi-processing

Page 23: Architecture of the Web browser

networking

used to access & transfer data

(representations of resources)

available on the Internet

HTTP

HTTPS

SPDY

Page 24: Architecture of the Web browser

networking

used to access & transfer data

(representations of resources)

available on the Internet

limited number of parallel connections

(usually, 2—6)

Page 25: Architecture of the Web browser

display (UI) backend

able to display common UI components

(windows, radio buttons,text controls,…)

browsershots.org/

Page 26: Architecture of the Web browser

JavaScript interpreter

interpreting & executing

JavaScript programs

on the client side

Carakan (Opera)

Chakra (Microsoft)

Nitro, JavaScriptCore (Apple)

SpiderMonkey, IonMonkey, Rhino (Mozilla)

V8 (Google)

Page 27: Architecture of the Web browser

data persistence

storing data on the client machine

Page 28: Architecture of the Web browser

data persistence

storing data on the client machine

cookies

localStorage – HTML5

cache

Page 29: Architecture of the Web browser
Page 30: Architecture of the Web browser

Architecture of the Web browser