Title: WordPress Not Removing Query String From Static Resources
Last modified: April 3, 2022

---

# WordPress Not Removing Query String From Static Resources

 *  Resolved [qzlbijay](https://wordpress.org/support/users/qzlbijay/)
 * (@qzlbijay)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/wordpress-not-removing-query-string-from-static-resources/)
 * 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](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 4 years, 1 month ago by [qzlbijay](https://wordpress.org/support/users/qzlbijay/).
    -  This topic was modified 4 years, 1 month ago by [qzlbijay](https://wordpress.org/support/users/qzlbijay/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/wordpress-not-removing-query-string-from-static-resources/#post-15521618)
 * that ?ver attached to /litespeed/css(js)/xxxxxxxx.css(ks) is intentionally added,
   can not be removed
 * please check this [page](https://docs.litespeedtech.com/lscache/lscwp/ts-optimize/#disk-space-filling-fast)
   or disable `CSS inline/external combine` and purge all
 *  Thread Starter [qzlbijay](https://wordpress.org/support/users/qzlbijay/)
 * (@qzlbijay)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/wordpress-not-removing-query-string-from-static-resources/#post-15521831)
 * Disabled The `CSS inline/external combine` but still multiple css files are genarating
   and the query string is still not gone
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/wordpress-not-removing-query-string-from-static-resources/#post-15521849)
 * 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](https://wordpress.org/support/users/qzlbijay/)
 * (@qzlbijay)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/wordpress-not-removing-query-string-from-static-resources/#post-15522126)
 * 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.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

## Tags

 * [Query String](https://wordpress.org/support/topic-tag/query-string/)

 * 4 replies
 * 2 participants
 * Last reply from: [qzlbijay](https://wordpress.org/support/users/qzlbijay/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/wordpress-not-removing-query-string-from-static-resources/#post-15522126)
 * Status: resolved