Support » Plugin: GDPR Cookie Compliance (CCPA ready) » Too long to load – Over 1 second

  • Resolved Theo Gk

    (@theogk)


    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 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Moove Agency

    (@mooveagency)

    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

    Thread Starter Theo Gk

    (@theogk)

    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?

    Plugin Author Moove Agency

    (@mooveagency)

    Hi @theogk

    The plugin will always check if the user accepted cookies.

    The difference in using the above script that switches off ajax is that the settings that you choose in the CMS may be cached by some servers so you may need to wait for some time until the new settings propagate. Which is the reason why we don’t use the static script injection be default.

    Hope this helps.
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Too long to load – Over 1 second’ is closed to new replies.