100% Money-Back Guarantee30-days money-back guarantee.

Text load slower than your page

Updated on November 22, 2024

If you notice that text changes applied by CTA Build are loading slower than your page content, it's likely due to conflicts with website speed optimization plugins such as Perfmatters or WP Rocket. These plugins often defer or delay JavaScript execution to improve page load times, which can interfere with the timely rendering of text changes.

Causes

  • Optimization plugins may defer or delay the execution of JavaScript files, including those necessary for CTA Build to render text changes promptly.
  • Important scripts like in our plugin like variation-renderer.js might not be excluded from defer or delay settings, causing them to load after the main content.
  • Some settings may cause scripts to load asynchronously, affecting the order and timing of script execution.

Solution: Exclude Specific Scripts from Defer and Delay

To ensure that text changes load simultaneously with your page content, you need to exclude certain scripts and functions from JavaScript defer and delay settings in your optimization plugins. Follow the steps below based on the plugin you are using:

Perfmatters Plugin

  1. 1
    Access Perfmatters Settings: Log in to your WordPress admin panel and navigate to Perfmatters > Settings > Assets.
  2. 2
    Adjust Defer JavaScript Settings: Find the Defer JavaScript and Delay JavaScript options. In the exclusion list, add the following scripts and functions:
    • /wp-content/plugins/ctabuild-plugin/variation-renderer.js
    • variation-renderer.js
    • updateElementText
    • applyVariations
    • window.ctabuild_variations
  3. 3
    Save Changes: After adding the exclusions, save your changes and clear any caches if necessary.

WP Rocket Plugin

  1. 1
    Access WP Rocket Settings: Go to WP Rocket > Settings > File Optimization in your WordPress admin panel.
  2. 2
    Exclude Scripts from Defer/Delay: Under the JavaScript Files section, find the options for Delay JavaScript Execution and Load JavaScript Deferred. In the exclusion fields, add:
    • /wp-content/plugins/ctabuild-plugin/variation-renderer.js
    • variation-renderer.js
    • updateElementText
    • applyVariations
    • window.ctabuild_variations
  3. 3
    Save Changes and Clear Cache: After updating the exclusions, save your settings and clear the WP Rocket cache.

Related