diff --git a/content/posts/website-best-practices.gmi b/content/posts/website-best-practices.gmi index 1845dc9..326af1e 100644 --- a/content/posts/website-best-practices.gmi +++ b/content/posts/website-best-practices.gmi @@ -163,10 +163,10 @@ Optimal loading is a complex topic. Broadly, it covers three overlapping categor HTML is a blocking resource: images and stylesheets will not load until the user agent loads and parses the HTML that calls them. To start loading above-the-fold images before the HTML parsing finishes, send a "link" HTTP header. -My website includes a "link" header to load an SVG that serves as my IndieWeb photo and favicon (hash removed from filename for readability): +my website includes a "link" header to load the image that serves as my IndieWeb photo and favicon. The header includes a "high" priority hint so the browser starts downloading the resource right away: ``` -link: ; rel=preload; as=image +link: ; rel=preload; as=image; fetchpriority=high ``` ### Don't count on the cache diff --git a/content/posts/website-best-practices.md b/content/posts/website-best-practices.md index 4babadd..6bdaf7e 100644 --- a/content/posts/website-best-practices.md +++ b/content/posts/website-best-practices.md @@ -166,10 +166,10 @@ Optimal loading is a complex topic. Broadly, it covers three overlapping categor HTML is a blocking resource: images and stylesheets will not load until the user agent loads and parses the HTML that calls them. To start loading above-the-fold images before the HTML parsing finishes, send a `link` HTTP header. -{{}} {{< codecaption >}} my website includes a `link` header to load an SVG that serves as my IndieWeb photo and favicon. Hash removed from filename for readability. {{< /codecaption >}} +{{}} {{< codecaption >}} my website includes a `link` header to load the image that serves as my IndieWeb photo and favicon. The header includes a [priority hint](https://wicg.github.io/priority-hints/) so the browser starts downloading the resource right away. {{< /codecaption >}} ```figure {var1="HASH" samp=true} -link: ; rel=preload; as=image +link: ; rel=preload; as=image; fetchpriority=high ``` {{}}