| 开发者 |
affilizz
romaincarlier |
|---|---|
| 更新时间 | 2026年10月19日 21:02 |
| PHP版本: | 7.3.0 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
The "Delay JavaScript execution" options postpone the Affilizz script until the first interaction, and minifying it again (it is already minified) can break it. The plugin excludes its script automatically from WP Rocket (delay, minification, concatenation), LiteSpeed Cache (minification, concatenation, defer and delay), Autoptimize (aggregation, minification) and WP-Optimize (minification). For the other plugins, and for the "Delay JS" option of WP-Optimize, add these two values to their JavaScript exclusions (delay, minification and concatenation) :
<identifier>/<hash>.js : open the source of a page with a widget, and copy the end of the src of the script tag with the id="affilizz-rendering-js" attribute ;sc.affilizz.com/affilizz.js.affilizz_rocket_exclusions filter (return an empty array to disable them).
In the hybrid mode, the HTML of your pages contains the rendered widgets, refreshed after a page view once older than the "Widgets cache duration" (1 hour by default). The visitors' browsers then display the current prices. When the best price changes by 5% or more, or its merchant or stock changes, the plugin purges the page cache of the post in WP Rocket, LiteSpeed Cache, W3 Total Cache and WP Super Cache, without changing the modification date of the post. The affilizz_purge_post_cache action lets you purge other caches (hosting, CDN) ; their own lifetime still applies otherwise.
Without PHP-FPM or LiteSpeed (mod_php), the refresh, limited to 3 seconds per widget, runs before the end of the connection of the visitor who triggered it.