Support » Plugin: GDPR Cookie Compliance (CCPA, PIPEDA ready) » Add preload to litty.css to improve performance

  • Resolved froughtz


    Going through Google’s PageSpeed test gave me recommendations to preload one of the CSS files of the plugin to potentially save a 1.8-second delay.

    The location of the file: gdpr-cookie-compliance/dist/styles/lity.css

    The recommendation: Consider using <link rel=preload> to prioritize fetching resources that are currently requested later in page load.

    Can you please add this in the next version of the plugin to improve the speed?

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


    Hi @froughtz,

    Thanks for using our plugins.

    Please read the related topic here:

    You can try to add the following code snippet to your functions.php in order to prevent loading Lity via JS:

    add_action( 'gdpr_enqueue_lity_nojs', '__return_false' );

    Alternatively, you can use our advanced hook to block the GDPR Cookie Compliance loading Lity assets, but in this case please ensure you’re loading the Lity CSS and JS by your theme, and you can add “preload” in this case:
    add_action( 'gdpr_disable_lity_enqueue', '__return_true' );

    Hope this helps.

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