Remove Query Strings From Static Resources

When we talk about WordPress performance, this issue comes up quite often. Our CSS and JavaScript files normally have the file version on the end of their URLs, such as domain.com/style.css?ver=1.0.

Some web servers are unable to cache query strings, even if a header is present. So the solution to avoid web server cache issues is removing the version from the URL. This will fix that warnings that you see in Pingdom and GTMetrix called “Remove query strings from static resources.”

Add the code below on your functions.php.

ABOUT AUTHOR

Nuno

I am a Freelance Web Developer and WordPress Expert based in London with a wealth of website development and support experience. I am great at problem solving and developing quick solutions.

LEAVE A COMMENT

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • LET'S TALK!

    Fill in the form below to make an enquiry or find my contact details on my contact page.