When you’re optimizing your website, you’ve probably noticed a page speed score telling you to remove query strings from your CSS and JavaScript files in WordPress. Query strings are URLs that have either ?
or &
.
But why do these appear in the URLs and what’s the cause? Actually query strings are used by plugin developers to push updates.
The static resources (like CSS and JS files) are usually cached by proxy servers or CDNs. And when a developer has to push an update, it won’t be rendered immediately because of the caching effects. Which is why they use query strings to instantly render updates, as query strings won’t be cached. But as a side effect, since they are not cached, they contribute to the loading time of a web page.