• Resolved qzlbijay

    (@qzlbijay)


    Hi LS Team

    Report number: XFTDGFTE
    Report date: 04/03/2022 04:00:13

    In my website, i have enabled remove query string from static resource

    Still when i visit my website from any incognito tag, i can see the js and css files are loading with ?ver=some_random_string query parameter appended.

    I have tried below methods.

    1. Enabled Drop Query String in LS Cache Section under Cache>Drop Query String
    and added ver* as a parameter

    2. Installed a third-party query string removal plugin

    3. Tried Querysting Removal Method by adding code to function.php provided by Kinsta Blog

    function remove_query_strings() {
       if(!is_admin()) {
           add_filter('script_loader_src', 'remove_query_strings_split', 15);
           add_filter('style_loader_src', 'remove_query_strings_split', 15);
       }
    }
    
    function remove_query_strings_split($src){
       $output = preg_split("/(&ver|\?ver)/", $src);
       return $output[0];
    }
    add_action('init', 'remove_query_strings');

    4. Tried random string removal method by using diffchecker and didn’t found anything using this ?LSCWP_CTRL=before_optm

    all of these 4 method didn’t solve my issue.

    My Webserver is Openlitespeed. Due to this issue my css file storage kept increasing. and it’s generating for each page
    for example here is the screenshot: https://ibb.co/kJM3pNk
    from the screenshot you can see it’s mainly generating 2 css file of same size, multiple times.

    I checked both version of css and they are same as per diffchecker.

    Please help me remove the ?ver query string. This thing filling up disk space quickly

    • This topic was modified 2 years, 8 months ago by qzlbijay.
    • This topic was modified 2 years, 8 months ago by qzlbijay.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support qtwrk

    (@qtwrk)

    that ?ver attached to /litespeed/css(js)/xxxxxxxx.css(ks) is intentionally added , can not be removed

    please check this page or disable CSS inline/external combine and purge all

    Thread Starter qzlbijay

    (@qzlbijay)

    Disabled The CSS inline/external combine but still multiple css files are genarating and the query string is still not gone

    Plugin Support qtwrk

    (@qtwrk)

    the query won’t gone , it’s always there , as long as you have enabled css minify or css combine.

    and above 2 options will generate the minifed/combined CSS files and saved into /litespeed/css/ directory

    the “CSS inline/external combine” was to address the disk size issue.

    Thread Starter qzlbijay

    (@qzlbijay)

    Alright

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress Not Removing Query String From Static Resources’ is closed to new replies.