• Resolved Ivica Delic

    (@ivicad)


    Hi, when I use Combine JavaScript Files feature (Combine multiple JavaScript files into one to lower the number of requests your site generates), I can see its cookie banner from the applicaton I bought – https://illow.io/ when I am logged into the site, but I don’t see illow cookie banner in the incognito/private window, although I Excluded from JavaScript Combination illow script: https://platform.illow.io/banner.js?siteId=bcbaae92-49c4-4b2c-8a3c-468fd3f7a44b

    However, when I deactivate the whole Combine JavaScript Files feature – I can see this cookie banner normal in the incognito/private window as well (when I am not logged into the site as admin).

    However, I don’t want to deactivate the whole feature Combine JavaScript Files feature on our sites, so I would like to know is there anyway to fix this (from any sides), so that Exclude from JavaScript Combination feature works for illow platform’s script as well?

    Thank you.

    • This topic was modified 1 year, 10 months ago by Ivica Delic.
    • This topic was modified 1 year, 10 months ago by Ivica Delic.
    • This topic was modified 1 year, 10 months ago by Ivica Delic.
    • This topic was modified 1 year, 10 months ago by Ivica Delic.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Elena Chavdarova

    (@elenachavdarova)

    Hello @ivicad,

    You can exclude the external sources from the combination using the following filter:

    add_filter( 'sgo_javascript_combine_excluded_external_paths', 'js_combine_exclude_external_script' );
    function js_combine_exclude_external_script( $exclude_list ) {
        $exclude_list[] = 'https://platform.illow.io';
    
        return $exclude_list;
    }

    This way all scripts loaded from this domain will be excluded from the combination.

    I ?suggest you apply the code into the theme functions.php file, clear the cache of the website and verify the results on your end.

    Best Regards,
    Elena

    Thread Starter Ivica Delic

    (@ivicad)

    Thank you very much Elena for this answer/solution, I appreciate it.

    BR, Ivica

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude from JavaScript Combination feature possible Bug’ is closed to new replies.