「Your options for preloading images with JavaScript」。要点:Back to All Posts Your options for preloading images with JavaScript There are a number of ways to preload an image on demand with JavaScript â each with their own strengths & drawbacks. Let's explore them. I just learned that the task of preloading images with JavaScript is surprisingly quirky. There are actually several ways to do it, and the best one to c。
「I used a generator to build a replenishable queue.」。要点:Back to All Posts I used a generator to build a replenishable queue. Generators can't be resurrected after they've completed. But we can make a replenishable version of them with the help of promises. Let's tinker. Ever since writing about them, the generator in JavaScript has become my favorite hammer. I'll wield it nearly any chance I can get it. Usually, 。
「DNS Resolution Adds Up」。要点:Back to All Posts DNS Resolution Adds Up DNS resolution is cheap, but it ain't free. In scenarios when it counts, the `dns-prefetch` resource hint could give you a nice, slight edge in the front-end performance game. I like the satisfaction of finding quick, little wins to maximize the front-end performance of a website. Lately, they've been found by digging。