• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty
Affordable VAST/VPAID for Wordpress has arrived. Serve ads with your videos starting today!

How to use WordPress with CDN

28 June 2017 / Martin / 7 Comments

Some of the FV Player users recently experienced issues with the last version – their videos were not playing. The reason was that there were bigger changes in our code and their websites used poorly configured CDN.

While CDN speeds up your site you must understand how it works to avoid issues and too much optimization which you don’t understand. Just make sure that you don’t remove query string versions – read on!

Don’t remove query string versions

Normally the FV Player script looks like this in your site HTML:

https://foliovision.com/site/wp-content/plugins/fv-wordpress-flowplayer/flowplayer/fv-flowplayer.min.js?ver=6.1.1

Site speed is important and everybody wants to speed up their website. So people use tools to test the load time of their websites and some of these tools (such as GT Metrix) suggest:

Resources with a "?" in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources:

This results in:

https://foliovision.com/site/wp-content/plugins/fv-wordpress-flowplayer/flowplayer/fv-flowplayer.min.js

What that means is any browser which comes to your site will download that script, cache it and hold on to it for as much as a year (the exact time depends on the Expires HTTP header, which is in general set high for static website resources as CSS or JavaScript). 

So then once the user comes back to your site a week later he will keep using the old script from his first visit. And it doesn’t matter that FV Player just introduced some new amazing feature, it just won’t be made available to him – until the user reloads the page at last.

If the query string would be kept in place, the version number in the query string would tell the browser that it’s time to download the script again as there are changes to it. Same can be achieved using the Etag, but then the browser must still request that file from the server to be able to see if the file has changed or not. 

The paid WordPress caching plugin WP Rocket does this properly – the plugin lets you get rid of query strings but encodes the version number into the file URL. So if you have to do this (for a little benefit of making sure the “some proxy caching servers” are able to cache your JS/CSS) WP Rocket does a good job at it.  

How CDN makes this worse  

If your site also uses CDN and you are stripping the version strings from query arguments it will hold on to the old script version as well. So the user tries to reload the script but still gets the old version back.

So it’s important to make sure your CDN understands that these version numbers are in the query part of URL for a reason. Make sure you set:

  • Bunny CDN – enable Caching -> General -> Vary Cache -> URL Query String
  • KeyCDN – disable “Ignore Query String”
  • StackPath – enable “Query String – Treat as separate cacheable item”
  • Cloudflare - ”Caching Level” needs to be set to “Standard”
  • CloudFront – “Query String Forwarding and Caching” set to “Forward all, cache based on whitelist” and enter “ver” for whitelist

Conclusion

Site speed testing tools such as GTmetrix make a lot of suggestions about how to speed up the website, but sometimes it seems they just add as many warnings as they can to appear as really powerful tools.

I’ve seen sites optimized to almost full Google Page Speed score which were still slow.

In the end, the only thing that really helps is reducing the number of items to a reasonable amount and mainly reducing the size of your CSS and JS – that will give you fastest initial page load time. Get ready to use a plugin such as Plugin Load Filter to selectively disable plugins for sections of websites where they are not needed.

If you ask how are you supposed to speed up your site, then we recommend using WP Rocket‘s Files optimization (Minification & Concatenation) feature. It will reduce the amount of JS and CSS files by 75% or so – all of these files will be grouped into a couple of files. 

The downside is that really have to check for JavaScript errors on your website and exclude the scripts which are causing the issues, which is not an easy process – see their documentation - Resolving Issues with File Optimization.

As this plugin is paid, we are looking for a free alternative. We don’t mind paying for software, but we would like to see an open source solution.

Autoptimize is another powerful plugin which combines all the JS into a single file and all the CSS into a single file. It also does so without any errors, you can just install it and it’s done. However during our speed testing, we found that it doesn’t actually make the site load faster on mobile – a single big JS file is slower to load as a couple of JS files as browser can’t use the multiple connections to download it. That’s why we like WP Rocket more. 

Both plugins name the minified CSS and JS files in a way that cleaning the minified cache results with a new file name and in every browser knows how to grab a fresh file.

Martin Vicenik

Martin Viceník

Martin graduated as an engineer in Computer Science from Slovak Technical University in Bratislava. He grew up in Liptovský Mikuláš in northern Slovakia next to the beautiful Tatra mountains. He is the developer behind our FV Player.

Categories: WordPress

Related Posts

  1. problem WordPress Version: 5.7.1

    problem WordPress Version: 5.7.1

  2. Improve your WordPress speed by Caching Comments

  3. Comment Caching Models to improve WordPress Core Performance

Reader Interactions

Comments

  1. Lisa 28 August 2017 at 11:20 pm

    Thanks this has been really helpful.

    Reply
  2. Avatar photoSanela Kurtek 11 September 2017 at 2:06 pm

    Hi Lisa,

    thanks for stopping by and letting us know.

    We’re glad you found it helpful!

    Cheers, Sanela

    Reply
  3. Ray 1 February 2019 at 10:44 am

    The big question is:

    Should I make a fine-tuned website the way ONE plugin developer wants it to be or should I remove the plugin and go for one that doesn’t cause errors with a fine-tuned website?

    Reply
    • Martin Vicenik 1 February 2019 at 12:38 pm

      Hello Ray,

      removing the query string versions can cause issues with any plugin that load its CSS or JavaScript files in front-end. Imagine that you are using some plugin called Amazin Plugin at version 1.1. It does certain things in your site front end. It loads //cdn.foliovision.com/wp-content/plugins/amazin-plugin/js/script.js?ver=1.1 script to do so.

      If you configure your website to strip the query string versions it will be stuck with loading /wp-content/plugins/amazin-plugin/js/script.js. And then when version 2.0 is out and it brings amazing new feautures your site visitors won’t get these as their web browsers will keep hanging to the old //cdn.foliovision.com/wp-content/plugins/amazin-plugin/js/script.js file which they have already cached. Normally your site would load //cdn.foliovision.com/wp-content/plugins/amazin-plugin/js/script.js?ver=2.0 and everything would be fine – the web browser would see the difference in URL and fetch the new file.

      If you want to remove the query string versions, you need to do it properly. For example WP Rocket does it properly – it makes the query string versions part of the file URL. So then GT Metrix doesn’t complain about it.

      Any way, I really think this claim that removing the query string versions will speed up the site is bogus – GT Metrix says that if stops “Most proxies, most notably Squid up through version 3.0” from caching these files.

      Squid version 3.0 is deprecated since March 2010, is anybody still using it?

      And what is the worst thing that can hapepn if you don’t don’t remove the query string versions? The proxy will have to fetch it again. It will still be properly cached in the browser. Or does it break the browser caching routine too?

      What would help is if GT Metrix wouldn’t be making these claims, it would save us this article and this discussion.

      Thanks, Martin

    • Ray 3 February 2019 at 1:12 am

      WP Rocket: The worst plugin for me. It instantly destroyed my website, even with all options deactivated. Even with all plugins tested against each other. It only went back to normal after completely removing WP Rocket.

      A live website with a complicated structure of plugins and layout isn’t compatible with WP Rocket.

    • Martin Vicenik 4 February 2019 at 11:54 am

      Hello Ray,

      we do have objections against WP Rocket, but it’s nothing so critical as you described. In general we have found their support to be useful.

      It doesn’t matter if you use WP Rocket or not, other plugins give you asynchronous loading of CSS/JS and critical CSS too. That actually matters, unlike removing the query string versions (which WP Rocket seems to do properly by the way).

      Thanks, Martin

    • Martin Vicenik 1 February 2019 at 12:41 pm

      To make it more clear – you said:

      Should I make a fine-tuned website the way ONE plugin developer wants it to be

      We are not asking you to fine tune your website. It’s GT Metrix who is asking you to remove the query string versions. We are saying – don’t do it, it’s not worth the trouble.

      To optimize your website just:

      • load your CSS asynchronously
      • provide critical CSS
      • defer the load of JS

      WP Rocket does a great job at it. Although the cache purging could be more effective.

      Thanks! Martin

Leave a Reply Cancel reply

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

You can click here to Subscribe without commenting

Primary Sidebar

Categories

  • Business
  • Camera Reviews
  • Case Studies
  • Design
  • FV Player
  • Internet Marketing
  • IT
  • Life
  • SEO
  • Slovak
  • Video of the Week
  • WordPress

Footer

Our Plugins

  • FV WordPress Flowplayer
  • FV Thoughtful Comments
  • FV Simpler SEO
  • FV Antispam
  • FV Gravatar Cache
  • FV Testimonials

Free Tools

  • Pandoc Online
  • Article spinner
  • WordPress Password Finder
  • Delete LinkedIn Account
  • Responsive Design Calculator
Foliovision logo
All materials © 2025 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
  • This Site Uses Cookies
  • Privacy Policy
  • Terms of Service
  • Site Map
  • Contact
  • Tel. ‭+421 2/5292 0086‬

We are using cookies to give you the best experience on our website.

You can find out more about which cookies we are using or switch them off in .

Powered by  GDPR Cookie Compliance
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Necessary Cookies

Strictly Necessary Cookie allow you to log in and download your software or post to forums.

We use the WordPress login cookie and the session cookie.

If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

Support Cookies

Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.

We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.

Please enable Strictly Necessary Cookies first so that we can save your preferences!

3rd Party Cookies

This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.

Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.

Please enable Strictly Necessary Cookies first so that we can save your preferences!