-
To render 60 frames every 1000ms, how much time is available to render a single frame? a. 100ms b. 20ms c. 16ms d. 30ms Ans: 16ms
-
What is the TTFB? a. Time to First Bit b. Time to First Byte
Recently I came to know about Reflow and Repaint. How it's affecting web performance. I am writing this post to give insights about reflow and repaint. Before Jumping into the topic, let's understand how the browser renders the website.
- When the user enters the URL, It will fetch the HTML source code from the server
- Browser Parse the HTML source code and convert into the Tokens (<, TagName, Attribute, AttributeValue, >)
- The Tokens will convert into the nodes and will construct the DOM Tree
- The CSSOM Tree will generate from the CSS rules
- The DOM and CSSOM tree will combine into the RenderTree
In Javascript, when you declare variable using var keyword
- The variable declared using var keyword outside the function are global scope.
- The variable declared using var keyword within the function are function scope
- The variable declared using var keyword will get hoisted
console.log(instagramId) // undefined
The var statement declares a function-scoped or globally-scoped variable, optionally initializing it to a value. Variables declared with var can be reassigned and redeclared in the same scope.
var name = 'Devkode'; // Global Scope
function greet() {
var message = 'Hello!!'; // Function Scope
console.log(name); // Output: Devkode
NewerOlder