Html 什么是渐进式渲染?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33651166/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 18:28:23  来源:igfitidea点击:

What is progressive rendering?

htmlprogressive

提问by Natumsol

In order to find a good internship, I am engaged in answering these questions, There is one question which I am not clear what it says, I have never heard relevant information before, so I want to know What is progressive rendering?

为了找到一个好的实习,我正忙着回答这些问题,有一个问题我不清楚它说的是什么,我以前从未听说过相关信息,所以我想知道 什么是渐进式渲染?

回答by cfreear

Progressive rendering is the name given to techniques used to render content for display as quickly as possible.

渐进式渲染是用于尽可能快地渲染内容以供显示的技术的名称。

It used to be much more prevalent in the days before broadband internet but it's still useful in modern development as mobile data connections are becoming increasingly popular (and unreliable!)

在宽带互联网出现之前,它曾经更加流行,但随着移动数据连接变得越来越流行(而且不可靠!),它在现代发展中仍然有用。

Examples of such techniques :

此类技术的示例:

  • Lazy loadingof images where (typically) some javascript will load an image when it comes into the browsers viewport instead of loading all images at page load.
  • Prioritizing visible content(or above the fold rendering) where you include only the minimum css/content/scripts necessary for the amount of page that would be rendered in the users browser first to display as quickly as possible, you can then use deferred javascript (domready/load) to load in other resources and content.
  • 延迟加载图像,其中(通常)一些 javascript 会在图像进入浏览器视口时加载图像,而不是在页面加载时加载所有图像。
  • 优先显示可见内容(或在折叠呈现之上),其中您只包含将在用户浏览器中呈现的页面数量所需的最小 css/内容/脚本,以便尽快显示,然后您可以使用延迟 javascript( domready/load) 加载其他资源和内容。

回答by Naman Sancheti

This pertains to the idea of sending data in chunkswhen doing Server side renderingrather than all at once. The advantage is reduced TTFB(Time to first Byte) i.e. the time period between the browser making the HTTP request and it receiving the first byte.

这与在进行服务器端渲染时分发送数据而不是一次全部发送的想法有关。优点是减少了TTFB(第一个字节的时间),即浏览器发出 HTTP 请求和接收第一个字节之间的时间段。

See below 'JSConf' talk for a detailed explanation: https://www.youtube.com/watch?v=aRaQe9n1lPk

有关详细说明,请参阅下面的“JSConf”演讲:https: //www.youtube.com/watch?v=aRaQe9n1lPk