Grokking the Modern Frontend System Design Interview
Vote

0% completed

​

Design a Masonry Photo Grid

We loaded the same grid of 30 photos in the browser lab, in the same three columns. In the first version the images had no width and height, and the page jumped 14 times as they arrived. Its Cumulative Layout Shift was 0.54, more than five times the 0.1 that counts as good. In the second version each image carried the width and height that the API sent with the list, and the page did not shift at all.

Both versions loaded the same images with the same delays into the same columns. The only difference that could move the page was one pair of numbers per photo, sent before the photo itself.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content