• Hi,

    I am having an issue with Litespeed, it’s creating tens of thousands of JS files. My hosting stated the following

    “The two difference appears to be related to nonce data for the age verification plugin you are using”

    < ;var age_gate_params={"ajaxurl":"https:\/\/www.giftmoments.co.uk\/wp-admin\/admin-ajax.php","settings":{"age":18,"type":"selected","bypass":"","restrict":"","title":false,"current_title":"Personalised Wolverhampton Wanderers Best Boyfriend In The World Photo Framed | Gift Moments","screen":"product","ignore_logged":0,"rechallenge":0,"has_filter":false,"viewport":"1","anon":0,"transition":"","cookie_domain":false},"misc":{"i":84673,"t":"product","qs":0},"errors":{"invalid":"Your input was invalid","failed":"You are not old enough to view this content","generic":"An error occurred, please try again","cookies":"Your browser does not support cookies, you may experience problems entering this site"}};
    ---
    > ;var age_gate_params={"ajaxurl":"https:\/\/www.giftmoments.co.uk\/wp-admin\/admin-ajax.php","settings":{"age":18,"type":"selected","bypass":"","restrict":"","title":false,"current_title":"Personalised West Bromwich Albion FC Love Coasters (x4) | Gift Moments","screen":"product","ignore_logged":0,"rechallenge":0,"has_filter":false,"viewport":"1","anon":0,"transition":"","cookie_domain":false},"misc":{"i":83420,"t":"product","qs":0},"errors":{"invalid":"Your input was invalid","failed":"You are not old enough to view this content","generic":"An error occurred, please try again","cookies":"Your browser does not support cookies, you may experience problems entering this site"}};

    They said it’s due to JS combine, But I don’t want to turn it off because of one plugin. I tried excluding the entire plugin but files continue to grow.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @ashmozza89,

    They’re right to an extent.

    I think the issue is actually the “JS Combine External and Inline” option in litespeed;

    The age_gate_params are different for every page as some pages are restricted and some aren’t (along with other options). There’s not really a way around that other than maybe to do an AJAX request on every page, but the user experience of that would be pretty bad.

    I’ll have a dig into litespeed and see what I can find as a solution. Failing that, might need to get creative

    Cheers
    Phil

    Thread Starter ashmozza89

    (@ashmozza89)

    Ok thank you.

    Plugin Author Phil

    (@philsbury)

    Hi again @ashmozza89,

    I’ve made a couple of changes it you wouldn’t mind trying it?

    Can get add the version here.

    Then, go to the Advanced settings and enable “Munge options”. Then clear the litespeed cache.

    Essentially what this will do is output a div with the options as a data attribute. It’s not the most elegant, but I think it should solve the age_gate_params issue.

    Thanks
    Phil

    Thread Starter ashmozza89

    (@ashmozza89)

    Thank you Phil.

    I have installed that version and will see how it goes, very helpful thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Creating JS files’ is closed to new replies.