使用 WordPress 页面构建器时是否有可能获得令人惊叹的 Lighthouse 分数?
我是电子商务和市场营销工作的前端工程师,我的日常任务之一是找出为什么客户的网站如此慢。他们中的大多数在不同的CM上,大多数WordPress,我遇到的一个不断的问题是Page Builders运送了一吨代码,这些代码略微掩盖了站点。这些属于“渲染障碍资源”,请参阅下面 问题的屏幕截图。
该文件已完全缩小,网站甚至不大(实际上仍在进行。对于Shopify的情况吗?)我仪表上的大多数客户都在CMS上并且得分不好,因为浏览器在加载200,000个应用程序和插件时必须要求多少数据。我当然很夸张,但是即使客户有一个小网站,但是是使用页面构建器建造的,并且有一些流行的插件,例如重力表格,他们的网站仍然遭受一些影响。
I'm a front end engineer working in e-commerce and marketing, and one of my routine tasks is finding out why client's websites are so slow. Most of them are on different CMS, most Wordpress, and a constant problem I come across is page builders ship with a ton of code that slightly bog the site down. These fall under 'render-blocking resources', see the below
screenshot of the issue.
This file is entirely minified and the website isn't even large (It's still in staging, in fact.) Is it possible to get an outstanding Lighthouse score when your site is build on a CMS and uses a small number of plugins/apps (in the case of Shopify?) The majority of the clients whose sites I gauge are on a CMS and get a bad score because of how much data that browsers have to request when loading 200,000 apps and plugins. I'm exaggerating of course, but even when a client has a small site, but was built with a page builder and has a few popular plugins like Gravity Forms, their sites still suffer a little.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从理论上讲,是的,您可以拥有一个不会影响分数的页面构建器,实际上,我个人使用过的所有页面构建器都不利于 Lighthouse/PSI 分数。
主要原因是,直到谷歌开始鼓励更多人意识到网站的感知性能之前,页面速度并没有成为一个有意识的优先事项。因此,构建页面构建器的团队没有考虑到这一点,并且更改其代码库以使页面构建器具有更高的性能可能不是一件容易的任务。
页面构建器需要遵循一些规则才能提高性能。
用户可能添加的任何部分可能需要的代码,甚至
如果该部分未被使用。所有正在加载的资源代码仅应在需要时才加载。
在这方面真的很糟糕,因为图像会自动超大。
必须为每个模板单独启用它。
HTML 元素不应完全使用 javascript 创建。
如果页面构建器遵循上述规则,并且您替换了页面的原始 css 和 js(因为它们是多余的),那么您可以拥有一个页面构建器,从而产生非常高性能的页面。
不过,我还没有找到满足这些标准的页面构建器,也许随着页面速度变得更加重要,更多的团队将更加关注页面构建器的性能。
In theory, yes, you can have a page builder that doesn't impact the score, in practice, all of the page builders that I have personally worked with are bad for Lighthouse/PSI scores.
The main reason is that pagespeed hasn't been a conscious priority untill google started encouraging more awareness of a site's percieved performance. So the teams that built pagebuilders didn't take that into account, and it's probably not an easy task to change their codebase so that page builders are more performant.
There would be a few rules for page builders to follow to be performant.
the code they might need for any section that a user might add, even
if the section is not being used.All the asset code being loaded should only be loaded if they are needed.
be really bad at this, as the images are automatically oversized.
it has to be enabled individually for each template.
HTML elements should not be created entirely using javascript.
If page builders followed the above rules, and you replaced the original css and js of the page, since they would be redundant, you could have a page builder that resulted in very performant pages.
I haven't found a page builder that met these standards though, maybe as page speed becomes more important, more teams will be more consicous of performance in their page builders.