简体   繁体   English

当所有有待改进的都是优化 CSS 文件时,我该如何改进我的 Largest Content Paint?

[英]How do I improve my Largest Content Paint when all that remains to be improved are optimized CSS files?

I'm optimizing my website and attempting to enhance the Largest Contentful Paint, but the only item that appears to require work are the optimised CSS files made with W3Speedster ;我正在优化我的网站并尝试增强 Largest Contentful Paint,但似乎唯一需要工作的项目是使用 W3Speedster 制作的优化CSS文件; here is a link to the Google speed test I performed .这是我执行的 Google 速度测试的链接。 I want the LCP to be less than 2.5.我希望 LCP 小于 2.5。

Any advice would be greatly welcomed;非常欢迎任何建议; thank you!谢谢你!

That does not mean it takes over 3 seconds to render the content.这并不意味着渲染内容需要超过 3 秒。
The rendering of you page from start render to document complete is only about 0.100 seconds.您的页面从开始渲染到文档完成的渲染只有大约 0.100 秒。

You server is your biggest problem.你的服务器是你最大的问题。 It's slow.它很慢。

The best thing you could do for your pages is either eliminate shareaholic.js, or get it to load sooner.您可以为您的页面做的最好的事情是消除 shareaholic.js,或者让它更快地加载。 It appears there may be some sort of lazyload.看来可能存在某种延迟加载。 I does not load until 1.8 seconds.我直到 1.8 秒才加载。 That is likely the reason the page rendering starts too late.这可能是页面渲染开始太晚的原因。 That and too many font and CSS files.那还有太多的字体和 CSS 文件。 The Browser cannot begin rendering and till it has all the CSS and font files.浏览器无法开始渲染,直到它拥有所有 CSS 和字体文件。 shareaholic.js is your 15th file being loaded. shareaholic.js 是您正在加载的第 15 个文件。 There are 5 images being prefetched before this js.在这个 js 之前有 5 张图片被预取。

You need to get the page to start rendering sooner.您需要让页面更快地开始渲染。 You could join some of the CSS files together to reduce the number of files being retrieved.您可以将一些 CSS 文件连接在一起,以减少正在检索的文件数量。

It's just your ads.这只是你的广告。 :) You'll most likely not be able to make it any faster. :) 您很可能无法让它变得更快。 Maybe a little bit.可能有点。 I reduced it from 4 seconds on Cloudways Nginx servers to under 2 seconds on WPX Apache servers.我将它从 Cloudways Nginx 服务器上的 4 秒减少到 WPX Apache 服务器上的不到 2 秒。

The problem is, when your ads are loading in the beginning a bidding war takes place.问题是,当您的广告开始加载时,就会发生竞价战。 It's only after this they can load in the ads.只有在这之后他们才能加载广告。 So it'll always take time.所以它总是需要时间。

If I were you, I'd change the host to something like WPX, they will also help you make it as optimized as possible, with ads.如果我是你,我会将主机更改为 WPX 之类的主机,它们还会帮助你尽可能优化它,并带有广告。 If not changing the host, I'd focus on the CLS.如果不更改主机,我会专注于 CLS。 Much bigger factor and easier to do something about.更大的因素和更容易做的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM