Title: Script delay
Last modified: May 19, 2021

---

# Script delay

 *  Resolved [Fernando Tellado](https://wordpress.org/support/users/fernandot/)
 * (@fernandot)
 * [5 years ago](https://wordpress.org/support/topic/script-delay/)
 * Hi again!
 * I’ve read the recent changelog for the plugin (v. 4.5.4) and it indicates that
   you have introduced the delay of the script load.
 * I’ve implemented in my site a hook action to optimize lity.css load, this one:
 *     ```
       add_action( 'gdpr_enqueue_lity_nojs', '__return_false' );
       add_action( 'gdpr_cc_prevent_ajax_script_inject', '__return_true' ); 
       ```
   
 * Is this hook needed after this latest update? (v. 4.5.4)
 * Thank you!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fscript-delay%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Moove Agency](https://wordpress.org/support/users/mooveagency/)
 * (@mooveagency)
 * [5 years ago](https://wordpress.org/support/topic/script-delay/#post-14461501)
 * Hi [@fernandot](https://wordpress.org/support/users/fernandot/)
 * You can test it by removing your hooks and using the new one below.
 * In our latest version, you can find in the Help section ‘Delay script execution’
   hook:
 *     ```
       add_filter( 'gdpr_init_script_delay', 'gdpr_delay_script_execution', 20, 1 );
       function gdpr_delay_script_execution( $ms ) {
         return 5000; // 5000 ms = 5 seconds.
       }
       ```
   
 * Hope this helps.
 *  Thread Starter [Fernando Tellado](https://wordpress.org/support/users/fernandot/)
 * (@fernandot)
 * [5 years ago](https://wordpress.org/support/topic/script-delay/#post-14476849)
 * I’ve seen that lity.css does not exists in your dist/scripts/ folder so I assume
   that is not necessary to optimize anything regarding it 😉

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Script delay’ is closed to new replies.

 * ![](https://ps.w.org/gdpr-cookie-compliance/assets/icon-256x256.png?rev=2376316)
 * [GDPR Cookie Compliance - Cookie Banner, Cookie Consent, Cookie Notice for CCPA, EU Cookie Law](https://wordpress.org/plugins/gdpr-cookie-compliance/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gdpr-cookie-compliance/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gdpr-cookie-compliance/)
 * [Active Topics](https://wordpress.org/support/plugin/gdpr-cookie-compliance/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gdpr-cookie-compliance/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gdpr-cookie-compliance/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Fernando Tellado](https://wordpress.org/support/users/fernandot/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/script-delay/#post-14476849)
 * Status: resolved