Support » Plugin: GDPR Cookie Compliance » Too long to load – Over 1 second

  • Resolved Theo Gk


    Hello, I have noticed that the plugin takes too long to load when the user has already accepted the cookies on a previous visit. Then your plugin hits the admin-ajax.php to get the response (example) -> {“cache”:true,”header”:””,”body”:””,”footer”:””}, but this takes almost over 1 second which is unacceptable.

    On the first visit everything is ok as the admin-ajax is not used.

    This is blocking the rest of the page to load, so the loading time gets bigger by 1 second if I just use your plugin. I use your plugin to almost 100 sites, this happens to all of them.

    Can you fix this somehow or it’s not possible? I know it’s a free plugin but 1 second delay is too much even for a free one. Thank you very much

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Moove Agency


    Hi @theogk

    Thanks for using our plugins.

    You can try to enable the static script injection feature by adding the following code snippet to your functions.php

    add_action( ‘gdpr_cc_prevent_ajax_script_inject’, ‘__return_true’ );

    Let us know if that helps.

    Thanks that fixes the loading delay. What exactly happens when I add this snippet? The scripts will always be loaded immediately, without checking first if the user has accepted them?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.