Issues related to the Nest, i.e. this website. The source code for the Nest is not yet public.

#90 Improving SEO and optimizing javascript script tags for import

Opened by saolof on March 1, 2023
saolof on March 1, 2023

Most of the content in nest seems to be static pages, with the javascript being either not needed or deferrable. This should be straightforward to optimize for SEO so that nest pages show up in Google results. Looking at your google pagespeed insights ( https://pagespeed.web.dev ), most of your perf problems are due to non-deferred js imports. So I would suggest these two fixes:

  1. Most of bootstrap’s CSS still works without the javascript and you don’t seem to use jquery directly, so consider just commenting out those two imports, checking if anything breaks, and if it does only importing it where needed.

  2. Consider using a script defer tag for highlight.js instead of a plain script tag in places where it doesn’t need to block rendering. This may cause a flash of unstyled content the first time someone ever reaches your page though, so there is a tradeoff.

  3. Set a cache policy: https://developer.chrome.com/docs/lighthouse/performance/uses-long-cache-ttl . This can be used both by browsers and by cloudflare iirc.

  4. Add a meta description to your headers: https://developer.chrome.com/docs/lighthouse/seo/meta-description . This will be the text description that shows up in google searches.

  5. Add an alt text to the <img class="profile-picture-tiny" src="/identicon/pmeunier/small"> element for the tiny profile picture. Google seems to complain about it.

pmeunier on March 2, 2023

Thanks! I’m working on a complete rewrite of the Nest, which will be open source and more robust. It is based on a completely different architecture, so it will be interesting to compare the results with the new one.

saolof on March 2, 2023

Ah nice, in that case the advice here will probably be outdated, apart from the more general bit about taking an occasional look at pagespeed insights.