Remove query strings from static resources in template.php I've read several articles throughout the web about removing query strings from static resources, in the template.php file, after I saw a recommendation to do so in a forum, for better page-loading time in Drupal.

All of the articles I've seen lacked some didcatance in the following points:


Why should one remove Query strings for better loading times? I've never seen them in any URL of any my site's pages, and, I don't understand why would their appearance in a URL effect in any shape or form the loading time of a site's page (that deals more to image-optimization, bandwidth, etc).
What is a static resource in Drupal? Cache is something dynamic so I'm guessing it's not the cache itself. So what is it?
Where should I put the following code of this JavaScript function, at the start of the file, at the end, or between any special segments? It wasn't clear from none of the articles. 

/**
 * Implements template_process_html().
 */
function MYTHEME_process_html(&amp;$variables) {
  $variables['styles'] = preg_replace('/\.css\?.*"/','.css"', $variables['styles']);
}
The only reason you'd want do this is to remove any cache busting query parameter. These are query parameters that are appended to a URL (e.g. www.example.com/js/some_file.js?b= 1433781670 &amp; www.example.com/css/some_file.css?b= 1433781671 ) to prevent browser caching. 



As the tutorial probably explained, you'd only want to do this for static resources (i.e. any web resource like a CSS/JS/Image file that will never change) so that the browser will cache the static resource. 

As for the template question you can place the MYTHEME_processs_html() function anywhere in template.php (if you don't have one, create it). On top of that, the only thing you'd need is to replace MYTHEME with the short name of your theme and flush your theme cache.

If you're new to Drupal I'd recommend avoiding this for now; unless you're sure there's only static CSS stylesheets that can safely have its cache-busting query string removed, you can end up with a scenario where modules/themes aren't displaying correctly because the cache busting query parameter was needed.