gpt4 book ai didi

apache - 谷歌在页面速度洞察工具中提到的往返行程是什么?

转载 作者:行者123 更新时间:2023-12-02 09:58:26 24 4
gpt4 key购买 nike

Google 表示,它必须进行 5 次网络往返,并且在前 3 次往返之后,只能查看首屏内容的 18%。

我该如何改进?

谢谢。

最佳答案

Pagespeed 的文档中,这个术语在不同的上下文中多次使用,这确实有点令人困惑

网络往返

来自wikipedia :

In telecommunications, the round-trip delay time (RTD) or round-trip time (RTT) is the length of time it takes for a signal to be sent plus the length of time it takes for an acknowledgement of that signal to be received.

所以更多的是关于 TCP 协议(protocol)。来自 docs :

If the amount of data required exceeds the initial congestion window (typically 14.6kB compressed), it will require additional round trips between your server and the user’s browser. For users on networks with high latencies such as mobile networks this can cause significant delays to page loading

同一页面的 2 个食谱:

To make pages load faster, limit the size of the data (HTML markup, images, CSS, JavaScript) that is needed to render the above-the-fold content of your page

Structure your HTML to load the critical, above-the-fold content first

首屏内容是无需滚动即可看到的屏幕

有关 mobile 的更多详细信息分析和3次往返

Due to this TCP behavior, it is important to optimize your content to minimize the number of roundtrips required to deliver the necessary data to perform the first render of the page. Ideally, the ATF content should fit under 98KB - this allows the browser to paint the page after just three roundtrips to have plenty time budget for server response latency and client rendering.

阻止往返

来自另一个文档 page :

This section describes the round trips required to load the page’s render-blocking resources, the total bytes used by the page, and how it compares to the median number of round trips and bytes used in the dataset. It can indicate if the page might be faster by modifying the appearance and functionality of the page.

尚不清楚这是否意味着按上述方式计算的网络往返,或者只是加载阻塞资源所需的额外调用。

无论如何,您都可以通过消除同步 javascript 调用等渲染阻塞资源来修复此问题(更多 here )

关于apache - 谷歌在页面速度洞察工具中提到的往返行程是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48478801/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com