Wordpress plugins
Remove Query Strings From Static Resources

Remove Query Strings From Static Resources

Version : 1.4.0
Tested up to : 5.0
Number of download : 9710
Author : LittleBizzy

Screenshots

Remove Query Strings From Static Resources
Remove Query Strings From Static Resources
Remove Query Strings From Static Resources
Remove Query Strings From Static Resources

Removes all query strings from static resources meaning that proxy servers and beyond can better cache your site content (plus, better SEO scores). Join our FREE Facebook group for support Worth a 5-star review? Thank you! Plugin Homepage Plugin GitHub Current Features Remove Query Strings is a simple plugin that automatically removes query strings from static resources on your WordPress website. By activating the plugin and refreshing your website on the frontend and then checking its source code (clear any caches), you will be able to see that query string have been removed from source URLs. By default, the following are removed: ?=, ?v=, ?ver=, ?version= Prior to version 1.2, only ?=ver was removed, but after further testing showed extensive use of other versioning strings we added three others to the list. The logic behind this is that common versioning strings are perhaps 90% or more of the common strings that can be safely removed to improve caching; moreover, the “keyless” strings ?= are also removed by default because they are impossible to define as a constant anyways. In other words, the plugin assumes that keyless and common versioning strings are the exact reason why you would install a plugin such as this. Example: (i.e. ?ver=1.12.4 is removed from the end of the URL source for jQuery, etc). To remove more types of query strings (unlimited), simply use the following constant in your wp-config.php file to define which strings to remove (below) Please note that even when using the defined constant, the keyless strings will still be removed, since they are impossible to define anyways. While the necessity of this function has been debated, most SEO and loading speed tools such as GTMetrix, Pingdom, etc still recommend removing all query strings from static resources. The reason being that some proxy servers (etc) that are part of the internet’s underlying infrastructure (or your unique browsing connection) will be able to cache your website’s content better when query strings do not exist. In other words, having query strings on static resources makes those resources look like many different resources rather than a single resource. It is also a valuable performance enhancing method if your web server (esp. Nginx) is using a caching method such as FastCGI or proxy_pass (reverse proxy caches). While programmers often argue that query strings help to “break caches” and ensure the proper version of a static file is loading correctly, sometimes this is not necessarily true depending on your setup. For example, if your site is behind CloudFlare or another similar proxy setup that caches static file content for 24 hours (example) regardless of query strings, then “breaking” the cache doesn’t work; in other cases, query strings can directly impact loading speed. By using this plugin, your site may see a performance boost in certain situations or for certain apps/users. Keep in mind that you may wish to consult your IT or server team to see if it will help or hurt your unique setup. Compatibility This plugin has been designed for use on SlickStack web servers with PHP 7.2 and MySQL 5.7 to achieve best performance. All of our plugins are meant for single site WordPress installations only; for both performance and usability reasons, we highly recommend avoiding WordPress Multisite for the vast majority of projects. Any of our WordPress plugins may also be loaded as “Must-Use” plugins by using our free Autoloader script in the mu-plugins directory. Defined Constants /* Plugin Meta */ define('DISABLE_NAG_NOTICES', true); /* Remove Query Strings Functions */ define('REMOVE_QUERY_STRINGS_ARGS', 'v,ver,version'); Technical Details Prefix: RMQRST Parent Plugin: Speed Demon Disable Nag Notices: Yes Settings Page: No PHP Namespaces: No Object-Oriented Code: No Includes Media (images, icons, etc): No Includes CSS: No Database Storage: Yes Transients: No WP Options Table: Yes Other Tables: No Creates New Tables: No Creates New WP Cron Jobs: No Database Queries: Backend Only (Options API) Must-Use Support: Yes Multisite Support: No Uninstalls Data: Yes Disclaimer We released this plugin in response to our managed hosting clients asking for better access to their server, and our primary goal will remain supporting that purpose. Although we are 100% open to fielding requests from the WordPress community, we kindly ask that you keep these conditions in mind, and refrain from slandering, threatening, or harassing our team members in order to get a feature added, or to otherwise get “free” support. The only place you should be contacting us is in our free Facebook group which has been setup for this purpose, or via GitHub if you are an experienced developer. Thank you!

Download now