Top 3 Speed Essentials for Web Developers

SPEAKER 1: To be
successful with images, it’s imperative that you
automate and systematize these things. Not only is this going
to save you time, but it’s going to ensure that
these things actually get done. What you want to
encourage, instead, is the flash of un-styled text. And this is when the
browser initially displays text using a system
font and then swaps it out for the custom
font once it has arrived. The good news here is that this
fix is literally a one-liner. Everywhere on your CSS where
you declare a font face, add the line font display swap. This tells the browser to
use that swapping behavior that I just talked about
in the previous slide. SPEAKER 2: The idea
behind code splitting is, instead of sending all the
JavaScript code to your users as soon as they load the very
first page of your application, is to only send them what they
need for their initial state and then allow them to fetch
future chunks on demand. The easiest way to get
started with code splitting is by using dynamic imports. Now, dynamic imports
has been supported in Webpack for quite some time. And it allows you to import
a module asynchronously, where a promise gets returned. Once that promise
finishes resolving, you can do what you need to
do with that piece of code. Now, a number of jobs with
libraries and frameworks have provided abstractions
on top of dynamic imports to make the process
of code splitting easier with your
current tooling.

Be the first to comment

Leave a Reply

Your email address will not be published.