DEV Community

Discussion on: Speeding Up Tesla.com - Part 1: Images and JS Minification

Collapse
 
jswalker_in profile image
jswalker.in
Thread Thread
 
camdhall profile image
CamDHall

Except the article is based on an incorrect assumption.

"Turns out, we can construct the render tree and even paint the page without waiting for each asset on the page: not all resources are critical to deliver the fast first paint. In fact, when we talk about the critical rendering path we are typically talking about the HTML markup, CSS, and JavaScript. Images do not block the initial render of the page—although we should also try to get the images painted as soon as possible."

developers.google.com/web/fundamen...

Thread Thread
 
jswalker_in profile image
jswalker.in

okay, but loading image via blob have beneficial too.

check out a small project of mine : jswalker.in/its/gladit
generate via blob and web worker.

Thread Thread
 
pavelloz profile image
Paweł Kowalski • Edited

Why would i generate blobs and add complexity of web workers to load an image? Browser is very good at loading an image without it.

Your demo is really a different case - you are loading lots and lots of images and none of them is "the most important" - tesla website has one image and its covers 100% of the page above the fold, so it needs to be loaded ASAP.

PS. What you used on this page is service worker not web worker and if im honest, im pretty sure that if you removed it and replaced it with plain old img tags it would load much much faster. Maybe thats material for a quick dev.to article ;-)