SlideShare a Scribd company logo
1 of 38
Download to read offline
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 NCRGaurav Mishra
 
CSS in JSの話 #friday13json
CSS in JSの話 #friday13jsonCSS in JSの話 #friday13json
CSS in JSの話 #friday13jsonYukiya 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 codeLaurence 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 GuideLaurence Svekis ✔
 
브라우저에 날개를 달자
브라우저에 날개를 달자브라우저에 날개를 달자
브라우저에 날개를 달자NAVER SHOPPING
 
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 & netlifynuppla
 
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
 
Ustream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer ToolsUstream Techtalks: Google Chrome Developer Tools
Ustream Techtalks: Google Chrome Developer ToolsMá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 basicsFalcon2018
 
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 gridArush 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 KrausWomen in Technology Poland
 
Presentation on php and Javascript
Presentation on php and JavascriptPresentation on php and Javascript
Presentation on php and JavascriptPradip 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
 
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 processingHarunaUtsumi
 
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 IrishNagamurali 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 KrausWomen 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 GregorioDavid 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 #seoplus2018Esteve 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 workflowWordPress
 
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 JavaScriptSoumen 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 TurboGearsAlessandro Molina
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalabilityTwinbit
 
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
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pagesNilesh 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 Slowdmethvin
 

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

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

Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationWave PLM
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...naitiksharma1124
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Soroosh Khodami
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfVictor Lopez
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)Max Lee
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAlluxio, Inc.
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024vaibhav130304
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignNeo4j
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024Shane Coughlan
 
CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfFurqanuddin10
 
What need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersWhat need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersEmilyJiang23
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAlluxio, Inc.
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionWave PLM
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAlluxio, Inc.
 
SQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionSQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionMohammed Fazuluddin
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...Alluxio, Inc.
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Krakówbim.edu.pl
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabbereGrabber
 
10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdfkalichargn70th171
 

Recently uploaded (20)

AI Hackathon.pptx
AI                        Hackathon.pptxAI                        Hackathon.pptx
AI Hackathon.pptx
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024
 
CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdf
 
What need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersWhat need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java Developers
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion Production
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
SQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionSQL Injection Introduction and Prevention
SQL Injection Introduction and Prevention
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf
 

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.