stale-while-revalidate
is often a great choice for assuring that frequently changing content can still take full advantage of the performance of our CDN's cache. This caching strategy is effective because it serves cached content to users while asynchronously revalidating without blocking the response.www.example.com
and images are hosted on a different subdomain, such as images.example.com
, this is a third party domain and will require another DNS lookup / SSL connection.font-display
property is set to swap
within the @font-face
declaration. By setting this property to swap
the browser is allowed to render text onto the page with a default font and later swap
out the default font once the custom font has loaded. Further reading​<style/>
tag as this completely eliminates the need for additional network requests. Ideally the CSS embedded into the head will only be critical above-the-fold CSS, although this can be harder to achieve in practice.<img>
element's srcset
attribute. This can either be accomplished ahead of time, creating a set of various sizes, or, probably more ideally, generating the particular variation on-demand and then caching the result.<script async
> or <script defer>
depending on your requirements.