So I have been playing with my page speed today. I have got it up there but my number one problem it shows is "Remove query strings from static resources". I have been reading only on how to fix this. I am behind Cloudflare so I thought it may have something to do with that, but after playing around I still can't fix it. Has anyone else successfully been able to fix this with Xenforo, or does someone have an idea of how I could improve them? Thanks for the info!
They're a necessary evil, but something I would actually say does far more benefit than harm.
Several of the css and js files also have dynamic query strings added to
them as well. With that, the pairCDN service won't be able to cache them,
so requests would have to go to the CDN, the CDN would then have to perform
a lookup at the origin each time, then serve back that result. If the URLs
were made static, without the query strings, the CDN service can then cache
and serve the cached copies of those normally.
The query string is essentially indicating the "version" of the file. In the case of avatars it is when the avatar was uploaded. In that sense, it isn't actually dynamically generated and the avatar URL is the same URL consistently until the avatar itself changes, and it's only then the query string part changes.
I believe some CDN providers are able to handle such things. Browsers are able to handle caching these resources with query strings locally.
It's an important mechanism which allows us to invalidate caches when it is crucial to do so, such as when JS and CSS change or indeed avatars are changes. Without such a mechanism, these files would change and those changes might not take effect for a considerable amount of time.