Defer javascript and show interim content on initial page load

This is probably already blocked by https://chromium.googlesource.com/chromium/src/+/master/docs/speed/metrics_changelog/2020_11_lcp.md:

Full viewport images, which are visually equivalent to background images, are no longer considered as the largest contentful paint


Good point: see Largest Contentful Paint (LCP)  |  Articles  |  web.dev

For text elements, only the size of their text nodes is considered (the smallest rectangle that encompasses all text nodes).

For all elements, any margin, padding, or border applied via CSS is not considered.

  • That’s why the static text-node must be rendered exactly the same size as the EmberJs text-node.
  • Or even slightly bigger by increasing the line-height.
    E.g. if the width of the text-nodes doesn’t match, there are a lot of geometric cases introduced by different linebreaks where the static text-node becomes smaller than the EmberJs-one.

See: LCP examples


I actually used the noscript-rendering of the posts inside a topic page. The CSS-classes do slightly match the real ones - so the look is equal.

See: Changes to app/views/layouts/application.html.erb

Edit: My fault, this is actually the crawler view: app/views/topics/show.html.erb

2 Likes