SlideShare a Scribd company logo
How Modern Browsers Work
Presented by,
Daliya John and Sneha P P
Topic
● Browser
● Browser Components
● Rendering Engine
● Javascript Interpreter
What is Browser ?
A browser is a software application used to locate, retrieve and display content on
the World Wide Web, including Web pages, images, video and other files.
How Browser works behind the scene?
(request)
Browser
(Translate domain name)
IP Address
Domain Name Server
(Response)
Interpret
Render
Display
Browser Components
(1) User Interface
● The user interface is the space where user interact with the browser.
● It includes address bar, back and next button , refresh, bookmark etc
(2) Browser Engine
● It works as a bridge between user interface and rendering engine.
● According to the inputs from various user interface , it queries and manipulate
the rendering engine.
(3) Rendering Engine
● Responsible for rendering the requested web page on the browser screen.
● The rendering engine interprets the html , that are formatted using css and
generate layout.
● That is displayed in the user interface
Different browser use different rendering engine
1. Internet Explorer : Trident
2. Firefox & Mozilla : Gecko
3. Chrome : Blink
4. Safari : Webkit
(4) Networking
● Browser component which retrieves the URL using the internet protocols of
HTTP.
● It handle internet communication and security
● It implement a cache of retrieved documents to reduce network traffic.
(5) Javascript Interpreter
● Interpret and execute the javascript code embedded in website.
● The interpreted result are send to the rendering engine for display.
(6) UI Backend
● UI backend is used for drawing basic widgets like combo box and windows.
(7) Data persistence / storage
● Browser support storage mechanism such as local storage , Indexed DB,
websql and file system.
● It is a small database created on the local drive of the computer where the
browser is installed.
● It manage user data such as cache, bookmark and preference.
Performance insights
● Executes script immediately reaches the <script> tag.
● If script is external, then first the resource has to be fetched from the network.
● In both cases, the parser will be on hold until it gets executed.
● Not only <script> tag, but also <style> and <link> tag can halt the rendering.
● Use “defer” and “async”
● Use Best-Practice Layout Techniques
Inline style will affect layout.
● Minimize the Number of CSS Rules
Tools like grunt-uncss, and gulp-uncss can significantly reduce your
style definitions and file sizes.
● Modify Hidden Elements
Elements hidden with display: none; will not cause a repaint or reflow when they are changed.
● Update Elements in Batch
var myelement = document.getElementById('myelement');
myelement.width = '100px';
myelement.height = '200px';
myelement.style.margin = '10px';
Use this method
var myelement = document.getElementById('myelement');
myelement.classList.add('newstyles');
Css
.newstyles {
width: 100px;
height: 200px;
margin: 10px;
}
● Does “rendering”
● Parse HTML and CSS
● Generates the layout and does painting
● Rendering engine used by different browser:
○ Internet Explorer: TRIDENT
○ Mozilla firefox: GECKO
○ Chrome : BLINK
○ Safari: WEBKIT
Rendering Engine
Rendering Engine
RENDER TREE
LAYOUT
PAINT
PARSING
● Parse HTML
● Generate nodes
● Content tree/ DOM tree
● Parse CSS
● DOM nodes + parsed CSS info
● Actual representation of what to be displayed onto the
screen
● Render tree
● Give each node the exact coordinates where it should
appear on the screen
● Always start from the root node.
● Recursive process
● Each node is painted by traversing the render tree.
● Using the UI Backend layer
WEBKIT main flow
GECKO main flow
Parsing
● Translating into a structure the code can use
● Consists of grammar. It contains:
○ Vocabulary
○ Syntax rules
● Result : Parse tree
Eg: 1 + 2 * 3
1. Lexical Analysis: create tokens
2. Syntax Analysis: apply the syntax rules.
+
2
*1
3
Parsing
Conventional
Parsing
Non-Conventional
CSS HTMLJS
HTML Parsing
● Forgiving nature, try to recover.
● Not CFG
● HTML DTD
● Parsing DOM tree
● Can be halted
<html>
<head>
<title>
Sample Program
</title>
</head>
<body>
<div>
<p>
Hello World..!
</p>
</div>
</body>
</html>
<html>
<head>
<title>
Sample Program
</title>
</head>
<body>
<div>
<p>
Hello World..!
</body>
</html>
<html>
<head>
<title>
Sample Program
</title>
</head>
<body>
<div>
<p>
Hello World..!
</p>
</div>
</body>
</html>
HTML Dom Element
HTML Body element
HTML Paragraph element
HTML Div element
TEXT
CSS Parsing
● It creates CSS object model (CSSOM)
P{
Color: red;
}
CSSStyleSheet
CSSRule
DeclarationsSelectors
colorp red
Render tree
● Generated while DOM tree is constructed.
● DOM + CSSOM
● Order in which they are going to be displayed
● Elements in the render tree are called ‘renderer’ or ‘render objects’.
● Render object is a rectangle
● Actual representation of what will show on screen
● JS can affect them.
Layout
● Calculates position and size
● Most of the time possible to compute geometry in one pass
● Recursive process begin at the root object(<html>)
● Dirty-bit system
● Global and incremental
○ Global: affects all renders, screen resize
○ Incremental: dirty bit system
GECKO reflow visualization
CSS Reflow Visualization
Paint
● Traverse the render tree
● Calls the paint() method to display the contents on the page
● Global and Incremental painting
● Painting order
○ Background-color
○ Background-image
○ Border
○ outline
JAVASCRIPT Interpreter
● JS is dynamically typed.
● Used to parse and execute javascript code.
● Different browsers have different js engines:
○ SPIDERMONKEY
○ V8
○ NITRO
○ CHAKRA
JIT Compilers
● Just In Time Compilers
● CSS, HTML and JAVASCRIPT interpreter.
● Generate machine code during runtime not Ahead Of Time
AST Bytecode Machine codeSource code
Parser
Optimizing
compiler
Bytecode
Generator
● MODERN BROWSERS have atleast 2 compilers.
● “Recompiling” Hot functions.
● It uses previously seen type information.
● De-optimize if the type is changed.
THANK YOU

More Related Content

What's hot

Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCRDrupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Gaurav Mishra
 
CSS in JSの話 #friday13json
CSS in JSの話 #friday13jsonCSS in JSの話 #friday13json
CSS in JSの話 #friday13json
Yukiya Nakagawa
 
10 java script projects full source code
10 java script projects full source code10 java script projects full source code
10 java script projects full source code
Laurence Svekis ✔
 
Chrome DevTools Introduction 2020 Web Developers Guide
Chrome DevTools Introduction 2020 Web Developers GuideChrome DevTools Introduction 2020 Web Developers Guide
Chrome DevTools Introduction 2020 Web Developers Guide
Laurence Svekis ✔
 
브라우저에 날개를 달자
브라우저에 날개를 달자브라우저에 날개를 달자
브라우저에 날개를 달자
NAVER SHOPPING
 
OpenCms Days 2014 - Nested containers in action
OpenCms Days 2014 - Nested containers in actionOpenCms Days 2014 - Nested containers in action
OpenCms Days 2014 - Nested containers in action
Alkacon Software GmbH & Co. KG
 
Tool it Up! - Session #2 - NetPanel
Tool it Up! - Session #2 - NetPanelTool it Up! - Session #2 - NetPanel
Tool it Up! - Session #2 - NetPaneltoolitup
 
Pre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlifyPre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlify
nuppla
 
Node js crash course session 5
Node js crash course   session 5Node js crash course   session 5
Node js crash course session 5
Abdul Rahman Masri Attal
 
When all you have is a hammer, everything looks like Javascript - ebookcraft ...
When all you have is a hammer, everything looks like Javascript - ebookcraft ...When all you have is a hammer, everything looks like Javascript - ebookcraft ...
When all you have is a hammer, everything looks like Javascript - ebookcraft ...
BookNet Canada
 
Mongo db1
Mongo db1Mongo db1
Mongo db1
VandanaKukreja
 
Ustream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer ToolsUstream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer Tools
Máté Nádasdi
 
React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix
Chen Lerner
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
Falcon2018
 
Magento x codekit x sass x compass x skeleton responsive grid
Magento x codekit x sass x compass x skeleton responsive gridMagento x codekit x sass x compass x skeleton responsive grid
Magento x codekit x sass x compass x skeleton responsive grid
Arush Sehgal
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
Women in Technology Poland
 
Html for beginners
Html for beginnersHtml for beginners
Html for beginners
Florian Letsch
 
Presentation on php and Javascript
Presentation on php and JavascriptPresentation on php and Javascript
Presentation on php and Javascript
Pradip Shrestha
 

What's hot (20)

Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCRDrupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
 
CSS in JSの話 #friday13json
CSS in JSの話 #friday13jsonCSS in JSの話 #friday13json
CSS in JSの話 #friday13json
 
10 java script projects full source code
10 java script projects full source code10 java script projects full source code
10 java script projects full source code
 
Chrome DevTools Introduction 2020 Web Developers Guide
Chrome DevTools Introduction 2020 Web Developers GuideChrome DevTools Introduction 2020 Web Developers Guide
Chrome DevTools Introduction 2020 Web Developers Guide
 
브라우저에 날개를 달자
브라우저에 날개를 달자브라우저에 날개를 달자
브라우저에 날개를 달자
 
OpenCms Days 2014 - Nested containers in action
OpenCms Days 2014 - Nested containers in actionOpenCms Days 2014 - Nested containers in action
OpenCms Days 2014 - Nested containers in action
 
Tool it Up! - Session #2 - NetPanel
Tool it Up! - Session #2 - NetPanelTool it Up! - Session #2 - NetPanel
Tool it Up! - Session #2 - NetPanel
 
ActiveDOM
ActiveDOMActiveDOM
ActiveDOM
 
Pre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlifyPre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlify
 
Node js crash course session 5
Node js crash course   session 5Node js crash course   session 5
Node js crash course session 5
 
When all you have is a hammer, everything looks like Javascript - ebookcraft ...
When all you have is a hammer, everything looks like Javascript - ebookcraft ...When all you have is a hammer, everything looks like Javascript - ebookcraft ...
When all you have is a hammer, everything looks like Javascript - ebookcraft ...
 
Mongo db1
Mongo db1Mongo db1
Mongo db1
 
Ustream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer ToolsUstream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer Tools
 
JavaScript and BOM events
JavaScript and BOM eventsJavaScript and BOM events
JavaScript and BOM events
 
React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
 
Magento x codekit x sass x compass x skeleton responsive grid
Magento x codekit x sass x compass x skeleton responsive gridMagento x codekit x sass x compass x skeleton responsive grid
Magento x codekit x sass x compass x skeleton responsive grid
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
Html for beginners
Html for beginnersHtml for beginners
Html for beginners
 
Presentation on php and Javascript
Presentation on php and JavascriptPresentation on php and Javascript
Presentation on php and Javascript
 

Similar to Neoito — How modern browsers work

You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)
Igalia
 
Dust.js
Dust.jsDust.js
Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)Per Henrik Lausten
 
Deep dive into browser internal processing
Deep dive into  browser internal processingDeep dive into  browser internal processing
Deep dive into browser internal processing
HarunaUtsumi
 
How Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul IrishHow Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul Irish
Nagamurali Reddy
 
Architektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan KrausArchitektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan Kraus
Women in Technology Poland
 
2016 stop writing javascript frameworks by Joe Gregorio
2016 stop writing javascript frameworks by Joe Gregorio2016 stop writing javascript frameworks by Joe Gregorio
2016 stop writing javascript frameworks by Joe Gregorio
David Zapateria Besteiro
 
Understanding Page Load / Ziling Zhao (Google)
Understanding Page Load / Ziling Zhao (Google)Understanding Page Load / Ziling Zhao (Google)
Understanding Page Load / Ziling Zhao (Google)
Ontico
 
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Esteve Castells
 
implement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflow
WordPress
 
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScriptDYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
Soumen Santra
 
PyGrunn2013 High Performance Web Applications with TurboGears
PyGrunn2013  High Performance Web Applications with TurboGearsPyGrunn2013  High Performance Web Applications with TurboGears
PyGrunn2013 High Performance Web Applications with TurboGears
Alessandro Molina
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
Twinbit
 
How browser work
How browser workHow browser work
How browser work
Manish Trivedi
 
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
Horacio Gonzalez
 
Front-end performances
Front-end performancesFront-end performances
Front-end performances
Smile I.T is open
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
Nilesh Bafna
 
Word press optimizations
Word press optimizations Word press optimizations
Word press optimizations
Shawn DeWolfe
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slow
dmethvin
 

Similar to Neoito — How modern browsers work (20)

You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)
 
Performance (browser)
Performance (browser)Performance (browser)
Performance (browser)
 
Dust.js
Dust.jsDust.js
Dust.js
 
Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)Intro to XPages for Administrators (DanNotes, November 28, 2012)
Intro to XPages for Administrators (DanNotes, November 28, 2012)
 
Deep dive into browser internal processing
Deep dive into  browser internal processingDeep dive into  browser internal processing
Deep dive into browser internal processing
 
How Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul IrishHow Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul Irish
 
Architektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan KrausArchitektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan Kraus
 
2016 stop writing javascript frameworks by Joe Gregorio
2016 stop writing javascript frameworks by Joe Gregorio2016 stop writing javascript frameworks by Joe Gregorio
2016 stop writing javascript frameworks by Joe Gregorio
 
Understanding Page Load / Ziling Zhao (Google)
Understanding Page Load / Ziling Zhao (Google)Understanding Page Load / Ziling Zhao (Google)
Understanding Page Load / Ziling Zhao (Google)
 
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
 
implement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflow
 
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScriptDYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
 
PyGrunn2013 High Performance Web Applications with TurboGears
PyGrunn2013  High Performance Web Applications with TurboGearsPyGrunn2013  High Performance Web Applications with TurboGears
PyGrunn2013 High Performance Web Applications with TurboGears
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
How browser work
How browser workHow browser work
How browser work
 
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 3/3 - Web Components avec Po...
 
Front-end performances
Front-end performancesFront-end performances
Front-end performances
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
Word press optimizations
Word press optimizations Word press optimizations
Word press optimizations
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slow
 

More from Neoito

Neoito — NativeScript Best Coding Practices
Neoito — NativeScript Best Coding PracticesNeoito — NativeScript Best Coding Practices
Neoito — NativeScript Best Coding Practices
Neoito
 
Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devs
Neoito
 
Neoito — Secure coding practices
Neoito — Secure coding practicesNeoito — Secure coding practices
Neoito — Secure coding practices
Neoito
 
Neoito — React 101
Neoito — React 101Neoito — React 101
Neoito — React 101
Neoito
 
Neoito — Scaling node.js
Neoito — Scaling node.jsNeoito — Scaling node.js
Neoito — Scaling node.js
Neoito
 
Neoito — Grid layout
Neoito — Grid layoutNeoito — Grid layout
Neoito — Grid layout
Neoito
 
Neoito — Software licensing
Neoito — Software licensingNeoito — Software licensing
Neoito — Software licensing
Neoito
 
Neoito — GitLab for project management
Neoito — GitLab for project managementNeoito — GitLab for project management
Neoito — GitLab for project management
Neoito
 
Neoito — Routing and navigation in Angular
Neoito — Routing and navigation in AngularNeoito — Routing and navigation in Angular
Neoito — Routing and navigation in Angular
Neoito
 
Neoito — Animations in Angular 5
Neoito — Animations in Angular 5Neoito — Animations in Angular 5
Neoito — Animations in Angular 5
Neoito
 
Neoito — A roadmap to Angular
Neoito — A roadmap to AngularNeoito — A roadmap to Angular
Neoito — A roadmap to Angular
Neoito
 
Neoito — Intro to WebSockets
Neoito — Intro to WebSocketsNeoito — Intro to WebSockets
Neoito — Intro to WebSockets
Neoito
 
Neoito — Typography for the web
Neoito — Typography for the webNeoito — Typography for the web
Neoito — Typography for the web
Neoito
 
Neoito — Design patterns and depenedency injection
Neoito — Design patterns and depenedency injectionNeoito — Design patterns and depenedency injection
Neoito — Design patterns and depenedency injection
Neoito
 

More from Neoito (14)

Neoito — NativeScript Best Coding Practices
Neoito — NativeScript Best Coding PracticesNeoito — NativeScript Best Coding Practices
Neoito — NativeScript Best Coding Practices
 
Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devs
 
Neoito — Secure coding practices
Neoito — Secure coding practicesNeoito — Secure coding practices
Neoito — Secure coding practices
 
Neoito — React 101
Neoito — React 101Neoito — React 101
Neoito — React 101
 
Neoito — Scaling node.js
Neoito — Scaling node.jsNeoito — Scaling node.js
Neoito — Scaling node.js
 
Neoito — Grid layout
Neoito — Grid layoutNeoito — Grid layout
Neoito — Grid layout
 
Neoito — Software licensing
Neoito — Software licensingNeoito — Software licensing
Neoito — Software licensing
 
Neoito — GitLab for project management
Neoito — GitLab for project managementNeoito — GitLab for project management
Neoito — GitLab for project management
 
Neoito — Routing and navigation in Angular
Neoito — Routing and navigation in AngularNeoito — Routing and navigation in Angular
Neoito — Routing and navigation in Angular
 
Neoito — Animations in Angular 5
Neoito — Animations in Angular 5Neoito — Animations in Angular 5
Neoito — Animations in Angular 5
 
Neoito — A roadmap to Angular
Neoito — A roadmap to AngularNeoito — A roadmap to Angular
Neoito — A roadmap to Angular
 
Neoito — Intro to WebSockets
Neoito — Intro to WebSocketsNeoito — Intro to WebSockets
Neoito — Intro to WebSockets
 
Neoito — Typography for the web
Neoito — Typography for the webNeoito — Typography for the web
Neoito — Typography for the web
 
Neoito — Design patterns and depenedency injection
Neoito — Design patterns and depenedency injectionNeoito — Design patterns and depenedency injection
Neoito — Design patterns and depenedency injection
 

Recently uploaded

Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 

Recently uploaded (20)

Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 

Neoito — How modern browsers work

  • 1. How Modern Browsers Work Presented by, Daliya John and Sneha P P
  • 2. Topic ● Browser ● Browser Components ● Rendering Engine ● Javascript Interpreter
  • 3. What is Browser ? A browser is a software application used to locate, retrieve and display content on the World Wide Web, including Web pages, images, video and other files.
  • 4. How Browser works behind the scene? (request) Browser (Translate domain name) IP Address Domain Name Server (Response) Interpret Render Display
  • 6. (1) User Interface ● The user interface is the space where user interact with the browser. ● It includes address bar, back and next button , refresh, bookmark etc
  • 7. (2) Browser Engine ● It works as a bridge between user interface and rendering engine. ● According to the inputs from various user interface , it queries and manipulate the rendering engine.
  • 8. (3) Rendering Engine ● Responsible for rendering the requested web page on the browser screen. ● The rendering engine interprets the html , that are formatted using css and generate layout. ● That is displayed in the user interface
  • 9. Different browser use different rendering engine 1. Internet Explorer : Trident 2. Firefox & Mozilla : Gecko 3. Chrome : Blink 4. Safari : Webkit
  • 10. (4) Networking ● Browser component which retrieves the URL using the internet protocols of HTTP. ● It handle internet communication and security ● It implement a cache of retrieved documents to reduce network traffic.
  • 11. (5) Javascript Interpreter ● Interpret and execute the javascript code embedded in website. ● The interpreted result are send to the rendering engine for display.
  • 12. (6) UI Backend ● UI backend is used for drawing basic widgets like combo box and windows.
  • 13. (7) Data persistence / storage ● Browser support storage mechanism such as local storage , Indexed DB, websql and file system. ● It is a small database created on the local drive of the computer where the browser is installed. ● It manage user data such as cache, bookmark and preference.
  • 14. Performance insights ● Executes script immediately reaches the <script> tag. ● If script is external, then first the resource has to be fetched from the network. ● In both cases, the parser will be on hold until it gets executed. ● Not only <script> tag, but also <style> and <link> tag can halt the rendering. ● Use “defer” and “async” ● Use Best-Practice Layout Techniques Inline style will affect layout.
  • 15. ● Minimize the Number of CSS Rules Tools like grunt-uncss, and gulp-uncss can significantly reduce your style definitions and file sizes. ● Modify Hidden Elements Elements hidden with display: none; will not cause a repaint or reflow when they are changed. ● Update Elements in Batch var myelement = document.getElementById('myelement'); myelement.width = '100px'; myelement.height = '200px'; myelement.style.margin = '10px';
  • 16. Use this method var myelement = document.getElementById('myelement'); myelement.classList.add('newstyles'); Css .newstyles { width: 100px; height: 200px; margin: 10px; }
  • 17. ● Does “rendering” ● Parse HTML and CSS ● Generates the layout and does painting ● Rendering engine used by different browser: ○ Internet Explorer: TRIDENT ○ Mozilla firefox: GECKO ○ Chrome : BLINK ○ Safari: WEBKIT Rendering Engine
  • 19. ● Parse HTML ● Generate nodes ● Content tree/ DOM tree ● Parse CSS ● DOM nodes + parsed CSS info ● Actual representation of what to be displayed onto the screen ● Render tree ● Give each node the exact coordinates where it should appear on the screen ● Always start from the root node. ● Recursive process ● Each node is painted by traversing the render tree. ● Using the UI Backend layer
  • 22. Parsing ● Translating into a structure the code can use ● Consists of grammar. It contains: ○ Vocabulary ○ Syntax rules ● Result : Parse tree Eg: 1 + 2 * 3 1. Lexical Analysis: create tokens 2. Syntax Analysis: apply the syntax rules. + 2 *1 3
  • 24. HTML Parsing ● Forgiving nature, try to recover. ● Not CFG ● HTML DTD ● Parsing DOM tree ● Can be halted <html> <head> <title> Sample Program </title> </head> <body> <div> <p> Hello World..! </p> </div> </body> </html> <html> <head> <title> Sample Program </title> </head> <body> <div> <p> Hello World..! </body> </html>
  • 26. CSS Parsing ● It creates CSS object model (CSSOM) P{ Color: red; } CSSStyleSheet CSSRule DeclarationsSelectors colorp red
  • 27. Render tree ● Generated while DOM tree is constructed. ● DOM + CSSOM ● Order in which they are going to be displayed ● Elements in the render tree are called ‘renderer’ or ‘render objects’. ● Render object is a rectangle ● Actual representation of what will show on screen ● JS can affect them.
  • 28.
  • 29.
  • 30. Layout ● Calculates position and size ● Most of the time possible to compute geometry in one pass ● Recursive process begin at the root object(<html>) ● Dirty-bit system ● Global and incremental ○ Global: affects all renders, screen resize ○ Incremental: dirty bit system
  • 33. Paint ● Traverse the render tree ● Calls the paint() method to display the contents on the page ● Global and Incremental painting ● Painting order ○ Background-color ○ Background-image ○ Border ○ outline
  • 34. JAVASCRIPT Interpreter ● JS is dynamically typed. ● Used to parse and execute javascript code. ● Different browsers have different js engines: ○ SPIDERMONKEY ○ V8 ○ NITRO ○ CHAKRA
  • 35. JIT Compilers ● Just In Time Compilers ● CSS, HTML and JAVASCRIPT interpreter. ● Generate machine code during runtime not Ahead Of Time
  • 36. AST Bytecode Machine codeSource code Parser Optimizing compiler Bytecode Generator
  • 37. ● MODERN BROWSERS have atleast 2 compilers. ● “Recompiling” Hot functions. ● It uses previously seen type information. ● De-optimize if the type is changed.