這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Defer CSS Addon for BWP Minify

外掛說明

BWP Minify is a powerful plugin to minify and compact several CSS files into only one.

If the resulting CSS file is too big or large, this addon allows to defer the load of this generated CSS file moving their declaration from header to footer, and put it again using asynchronous javascript and DOM manipulation.

This technique is recommended to use in conjuntion with the “css-above-the-fold” practice, as well introducing early CSS in-page allows proper styling display while the main CSS file is still loading.

There are some options to do the above-the-fold optimization, also we have developed a CSS Above The Fold plugin that reuses the current theme stylesheet extracting chunks of CSS code applying a special markup.

Another plugin that does this solution but providing an administration area to configure it manually is Autoptimize, that allows to define a specific CSS code in a independent way of your theme CSS stylesheet.

螢幕擷圖

  • An example of resulting javascript code of asynchronous CSS file loading.

安裝方式

  1. Unzip and upload defer-css-addon-for-bwp-minify folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Nothing else, make sure you have also activated the BWP Minify plugin.

常見問題集

I activated this plugin and now there is like a second without styles in my page, why?

This is because you don’t have a css-above-the-fold solution, or if you have one, your selection of critical CSS code is not enough to display properly the top of the page, and you need to redefine it.

使用者評論

閱讀全部 2 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Defer CSS Addon for BWP Minify〉的開發相關工作。

參與者

將〈Defer CSS Addon for BWP Minify〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0

Release Date: April 13th, 2015

  • First and tested released until WordPress 4.2
  • Compatibility whith last and older versions of BWP Minify
  • Tested code from WordPress 3.3.2 version.