Speed… speed… speed… it's all about speed… or is it? For years, the speed in which your site loads has been one of the many "ranking signals" search engines use to assess where your site will display on their search results page. If your site loads too slowly, it will be demoted in the results.
To get the best performance out of a site, developers rely on a number of testing sites that flag potential issues and offer suggestions on how to improve performance. One very popular site is GTMetrix. When you test your site through GTMetrix, it displays the results of Google PageSpeed and Yahoo YSlow. And when it comes to a WordPress site, in almost every case you will see the following red flag for "Remove query strings from static resources":

As you can see from the image, every file that displays a query string is either a CSS or JavaScript file. This is because the default behavior for the WordPress wp_enqueue_script function is to append a string specifying the script version number. If the developer added a version number, it is concatenated to the end of the path as a query string. If no version is specified or set to false, then WordPress automatically adds a version number equal to the current version of WordPress you are running. The default setting is false. If the version variable number is set to null, no version number is added, but this requires a purposeful action on behalf of the developer.
If you add the following code to your theme's functions.php file, you will remove the query string version numbers from all of your scripts at once, which in turn results in an improved score in Google PageSpeed.
Alternate Code
As an alternative, this code snippet works just as well as the above.
If everything works as expected, the next time you test your site with Google PageSpeed, you should receive results as follows:

If testing still shows static resources with query strings, this means that the developers may have bypassed wp_enqueue_script in favor of directly calling the CSS or JavaScript file.
Guys there are some new query strings like without the key. Example ?123 you see no variable.
The plugin can remove all it, and no database, so its very fast load
https://wordpress.org/plugins/remove-query-strings-littlebizzy/
Hope you like it, cheers Victor
Hi Victor, I tried your code for ” Removing Query Strings”
The top one did not work but the bottom one did!?
Weird thing also is that it seems that different themes with studiopress return different results, I guess they are all coded a bit differently!?
There are a couple of sites I support that use WP All Import. When that plugin and these techniques are use, it breaks Event Espresso. Both plugin developer teams blame each other. I could either deactivate one or the other plugin and the problem goes away, but leaving the Query strings on the files, fixes the issue.