[wordpress插件] Advanced WPPerformance先进的WP性能

wordpress 插件 文章 2020-02-09 15:20 517 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

This plugin adds several performance improvements to your WordPress site.

此插件为您的WordPress网站增加了一些性能改进。

In contrst to other performance Plugins, this one sets focus on HTTP\2 Standards (like Server Push and SPDY).

与其他性能插件相反,该插件集中于HTTP \ 2标准(例如Server Push和SPDY)。

minify assets

最小化资产

This plugin minifies all CSS and JS Files and caches them.

此插件会缩小所有CSS和JS文件并对其进行缓存。

It will not merge them into on file.

它将合并到文件中。

This way you are still able to use conditional assets and if you are using HTTP/2, which I highly recommend, it’s not necessary to do so.

这样,您仍然可以使用条件资产,并且如果我使用HTTP / 2(我强烈建议使用HTTP / 2),则不必这样做。

Optimizes JS Delivery

优化JS投放

It moves all scripts to the footer and adds a defer attribute.

它将所有脚本移至页脚并添加 defer 属性。

This makes sure the scripts won’t block the page render process but will still be executed in the right order.

这样可以确保脚本不会阻止页面渲染过程,但仍会按正确的顺序执行。

In some cases, this could break inline JavaScript

在某些情况下,这可能会破坏嵌入式JavaScript

Optimizes CSS Delivery

优化CSS投放方式

All CSS Files will be removed from the head and loaded asynchronously.

所有CSS文件将从头部移除并异步加载。

This makes sure your CSS Files won’t delay the page rendering.

这样可以确保您的CSS文件不会延迟页面渲染。

To reduce the flash of unstyled content (FOUT) I recommend adding a Critical CSS.

为了减少未样式化内容(FOUT)的闪烁,我建议添加一个Critical CSS。

conditonal Critical CSS

条件性关键CSS

By default this plugin provides a textarea where you can put your critical CSS.

默认情况下,此插件提供一个textarea,您可以在其中放置关键的CSS。

Read more about Conditional critical CSS

阅读有关条件关键CSS 的更多信息

Critical CSS API

关键CSS API

We implemented an awesome new feature!

我们实现了一个很棒的新功能!

Read more about the Critical CSS API.

详细了解关键CSS API

HTTP/2 Server Push

HTTP / 2服务器推送

Server push is a HTTP/2 feature that allows you to send site assets to the user before they’ve even asked for them.

服务器推送是一种HTTP / 2功能,可让您在用户甚至没有要求之前就将站点资产发送给用户。

There are two ways to achieve this.

有两种方法可以实现此目的。

Both have their pros and cons.

两者都有其优点和缺点。

So this plugin supports both, the decision is up to you.

因此,此插件支持这两种功能,决定权由您决定。

PHP

PHP

While WordPress builds your site, this plugin gets all enqueued scripts and styles and adds them as a link attribute to the response headers.

当WordPress建立您的网站时,此插件会获取所有排队的脚本和样式,并将它们作为链接属性添加到响应标头中。

That way you can be certain only files are being pushed, that are actually needed.

这样,您可以确定只推送了实际需要的文件。

But: Since they are set while the server builds your site, this won’t work if you’re using a server caching (which I highly recommend).

但是:由于它们是在服务器构建您的网站时设置的,因此,如果您使用服务器缓存(我强烈建议),则此方法将无效。

.htaccess

.htaccess

The second option puts all files to push inside you .htaccess.

第二个选项将所有文件放入您的.htaccess文件中。

This way they are being pushed also if you’re using server caching.

如果您使用服务器缓存,也可以通过这种方式推送它们。

But: If your assets change (new versions / depreciated scripts), don’t forget to update the .htaccess.

但是:如果您的资产发生更改(新版本/折旧的脚本),请不要忘记更新.htaccess。

This can be done with one click while saving the settings.

保存设置时,只需单击一下即可完成。

Contribute

贡献

A development version of this plugin is hosted on github.

此插件的开发版本托管在github上。

If you have some ideas for improvements, feel free to dive into the code:

如果您有改进的想法,请随时深入代码:

https://github.comico-martin/Advanced-WPPerformance

https://github.comico-martin/Advanced-WPPerformance

安装步骤

    1. Upload the plugin folder to the /wp-content/plugins/ directory or install it from the plugin directory
    2. 将插件文件夹上传到 / wp-content / plugins / 目录或从插件目录安装

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Done.

    6. 完成。

      You can still deactivate options from Settings -> Advanced WPPerformance

    7. 您仍然可以从“设置”->“高级WPPerformance”中停用选项

下载地址

https://downloads.wordpress.org/plugin/advanced-wpperformance.1.6.2.zip

https://downloads.wordpress.org/plugin/advanced-wpperformance.1.6.2.zip

-EOF-

AI助手支持GPT4.0