How To Remove Query Strings From Static Resources?

Question

I am getting Remove Query Strings From Static Resources.

Hi All, Hope You’re Well! Getting Significant Slowdown On My Site Philbournedigitaldotcom From The Above Error. The Avada Thumbnails That Generate For Blog And Portfolio Posts Seem To Be The Issue.

Tried Every Plugin To Fix – Still Not Working. Any Tips?

in progress 0
Ali Akkas 1 year 5 Answers 0

Answers ( 5 )

  1. Query Strings in WordPress are the URLs containing “?” or “&”. For example, askwpDOTorg/script.js?ver=1.0. The CSS and JavaScript file which contain versions controlling are the query strings. By removing Query Strings,  caching can be improved. And removing Query Strings fix the warning in GTMetrix and Pingdom which is “Remove query strings from static resources.”

    Remove Query Strings from Static Resources:

    Use WP-Rocket And Simply Check The Box Of Remove Query Strings from Static Resources

    See More About How To Speed Up WordPress Website

  2. Removing Query Strings from Static Resources:

    I remove the query strings ALWAYS and everything works. It is important to remove them for security reasons. Every security plugins have an option to remove it. But you can also do it adding a simple function in functions.php

    From the versioning of the files, including jQuery, WordPress version, and other files, it is possible to find the known security problems they have introduced. Then, it becomes easy to find ways to hack the website, going also beyond your Wordfence.

    Security services and caching plugins have flags to remove them. Besides WordPress has a filter to use to remove them via functions.php

    Remove them is a choice.

    Many times WordPress releases its files carrying critical security bugs. Knowing the version, some people know how to use the security problems to get an advantage counter you.

  3. Why there’s no need to remove query strings from static resources:

    That’s a common problem I notice. Without query strings, often your site will pull the cached file from your browser cache, instead of the new one directly from the server, because without them there’s no way to tell there’s a newer version. Only another option besides retaining them is clearing your browser cache and the caches of every single visitor your website has ever had

  4. Remove query strings:

    Why do you think you need to remove very strings? Sometimes query strings are needed so that the files are not cached. It depends of course on what it is, but I wouldn’t even worry about it.

    People miss a CRITICAL part of the PageSpeed Insights directive related to this issue. It does NOT say “Remove query strings”. It specifically recommends “Remove query strings AND ENCODE THEM IN THE URL.”

    If you don’t do that second part, you are quite likely to seriously bork your site. You will have problems with versioning of fixed assets after upgrades to themes/plugins/core – which you might not even notice yourself as you have cleared your local cache but can’t force previous visitors to do the same.

    You’ll also seriously screw up things like Google Maps which use query parameters for critical info, as one example.

    And the payoff for removing the query strings (it allows a very small, very specific percentage of certain types of proxy servers to better cache certain assets) is almost never worth the complexity and additional dev time introduced to encode them in the URL.

    Minification and concatenate both CSS and JS in WP-Rocket improved my Grade from A92 to A98, but unfortunately slowed down the site to about 2.5 sec, instead of the 433 I had before.

  5. You should be fine removing the query strings when caching your pages. IF this would cause any issues, then don’t remove them. In the end, they do not offer significant speed improvements.

    What you need to focus on is the page size and the number of requests. The numbers represented in the screenshot are indicative of a website that needs a lot of speed optimization TLC. Start with optimizing images, or deferring load of videos. Take a look at all the plugins you’re using do you NEED all of them?

Leave an answer

Choose from here the video type.

Put here the video id : https://www.youtube.com/watch?v=sdUUx5FdySs Ex: 'sdUUx5FdySs'.

What is the capital of USA? ( Washington )