The Critical Rendering Path Flashcards

1
Q

What is the critical rendering path?

A

process that the browser goes through to convert html and css to pixels on the screen

DOM > CSSOM > Render Tree > Layout > Paint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the process the browser follows to construct the DOM

A

Characters > Tokens > Nodes > DOM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Is css render blocking

A

Yes

The browser prevents the page from rendering until it receives all it’s css

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the render tree

A

representation of what is visible on the screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is layout

A

how elements are arranged on the screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are 3 ways to optimize HTML for speed

A
  1. minify
  2. compress
  3. cache
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How would you prevent a style sheet from render blocking?

A

set media in the link tag to something like print or orientation:landscape

this tells the browser not to use these styles unless the conditions in the media are met

example:
‘’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why would you use async on your script tag?

A

To prevent the script from blocking the parser from parsing your html file

This allows you to place your script in the head and allows the css to be downloaded first then the async tag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the 3 main buckets for optimizing the critical rendering path?

A

minimize bytes
reduce critical resources
shorten crp length -> number of round trips the browser must make to the server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Is a script with async a critical resource?

A

no

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How would you find the number of critical bytes?

A

get the byte amount of the critical resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does a css block an what does js block?

A

css blocks rendering to screen

js blocks the browser from parsing the markdown

How well did you know this?
1
Not at all
2
3
4
5
Perfectly