You can set CloudFlare’s CDN to cache static content according to these levels:
- No Query String / Basic: Only delivers resources from cache when there is no query string.
- Ignore Query String / Simple: Delivers the same resource to everyone independent of the query string (Note: The Ignore Query String setting only applies to static file extensions. This setting will remove the query string when generating the cache key, so that a request for "style.css?something" will be normalised to just "style.css" when serving from the cache.).
- Standard / Aggressive: Delivers a different resource each time the query string changes.
Note: CloudFlare, by default, does not cache HTML content. You need to write a Page Rule to cache static HTML content.
- No Query String / Basic: example.com/pic.jpg
- Ignore Query String / Simple: example.com/pic.jpg
- Standard / Aggressive: example.com/pic.jpg?with=query