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

CloudFlare Rocket Loader Ignore

描述

This plugin tells CloudFlare’s Rocket Loader not to process the given script by adding an attribute to the script tag. Per https://support.cloudflare.com/hc/en-us/articles/200169436–How-can-I-have-Rocket-Loader-ignore-my-script-s-in-Automatic-Mode-

Disclaimer: This plugin is not affiliated with or endorsed by CloudFlare.

If you need help with this plugin

If this plugin breaks your site or just flat out does not work, please go to Compatibility and click “Broken” after verifying your WordPress version and the version of the plugin you are using.

Then, create a thread in the Support forum with a description of the issue. Make sure you are using the latest version of WordPress and the plugin before reporting issues, to be sure that the issue is with the current version and not with an older version where the issue may have already been fixed.

Please do not use the Reviews section to report issues or request new features.

螢幕截圖

  • Plugin settings page
  • HTML source of a webpage showing attribute added to W3TC combined script

安裝

  1. Upload plugin file through the WordPress interface.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to Settings » CloudFlare Rocket Loader Ignore, configure plugin.
  4. View a page that contains a script tag with one of the scripts you configured, it should contain a “data-cfasync=false” attribute. Other scripts should not.

常見問題

How do I use the plugin?

Go to Settings » CloudFlare Rocket Loader Ignore and insert filenames of .js files you want the Rocket Loader to not process. Make sure the “enabled” checkbox is checked. One filename per line.

To exclude specific files, use the full filename including the .js file extension. You can also match patterns by using only the filename or parts of the filename. For example, to exclude any .js file containing the name “jquery” (ex: jquery, jquery-migrate, jquery-ui, etc), simply enter jquery. Any .js file that contains the word “jquery” will be ignored by Rocket Loader.

I entered some filenames but don’t see any changes on the page.

Are you caching your pages?

I don’t want the admin CSS. How do I remove it?

Add this to your functions.php:

remove_action('admin_head', 'insert_cfrli_admin_css');

評價

2016年9月26日
This plugin does exactly what it says. It excludes scripts from CloudFlare Rocket Loader by adding the data-cfasync=”false”. All you need to add the JavaScritp files you want CloudFlare’s Rocket Loader to ignore. (Ex: jquery-migrate.js to exclude only that file or ‘jquery’ to exclude any files with the word ‘jquery’ in it.) Kudos to the developer 🙂
2016年9月3日
Last updated 2 years ago, not the best rating, and version 0.0.6 … hmz so had my doubts about this plugin logically. But it’s EXACTLY what I needed, works fantastic and great functionality. Fixed my lazy image loading and shortcode problem. While keeping the best from Cloudflare Rocket Loader combined with W3TC and https://wordpress.org/plugins/autoptimize/ This plugin really is version 1.0 worthy!
閱讀全部10個評價

貢獻者及開發者

“CloudFlare Rocket Loader Ignore” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 CloudFlare Rocket Loader Ignore 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

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

修改日誌

0.0.6

  • updated .pot file and readme
  • fixed error with empty needle in textarea array
  • code to add data-cfasync attribute to combined scripts has been added but not implemented yet

0.0.5

  • fixed issue with breaking admin functionality (added is_admin() check)
  • added prelim code to add cfa attribute to inline and combined JS, pending response from people in forum (https://wordpress.org/support/topic/not-working-with-multiple-script-filenames)

0.0.4

  • added option to switch plugin sentiment from false to true
  • footer scripts also included

0.0.3

  • fixed issue with plugin not handling multiple scripts
  • adjusted code placement per CloudFlare guidelines

0.0.2

  • fixed validation code
  • pattern matching is more precise: code only checks filename for match instead of whole string

0.0.1

  • created