Caching Static HTML and Ignore Query Strings

Hi everyone,

I want to cache the HTML on this page for any query string:

For example, I want the following URLs:

So i want to just cache by ignoring the query string.

But here it says support.cloudflare.com/hc/en-us/articles/200168256 :

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.).

But it only works for static file extensions listed here:
support.cloudflare.com/hc/en-us/articles/200172516-Which-file-extensions-does-Cloudflare-cache-for-static-content-
Cloudflare’s CDN caches the following types of static content by extension for all account types by default: css bmp tif ttf docx woff2 js pict tiff eot xlsx jpg csv eps woff xls jpeg …

How do I ignore query string AND cache HTML???

Thank you,
Evan Jerkunica

Hi everyone,

I want to cache the HTML on this page for any query string:

For example, I want the following URLs:

For any id value I want to show the base URL content:

So i want to just cache by ignoring the query string.

But here it says https://support.cloudflare.com/hc/en-us/articles/200168256 :
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.).

But it only works for static file extensions listed here:
https://support.cloudflare.com/hc/en-us/articles/200172516-Which-file-extensions-does-Cloudflare-cache-for-static-content-

How do I ignore query string AND cache HTML???

Thank you,
Evan Jerkunica

This is possible using custom cache keys. At the moment that is an enterprise only feature. it might also be possible using Cloudflare workers.

Hi everyone,

I want to cache the HTML on this page for any query string:

For example, I want the following URLs:

For any id value I want to show the base URL content:

So i want to just cache by ignoring the query string.

But here it says https://support.cloudflare.com/hc/en-us/articles/200168256 :
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.).

But it only works for static file extensions listed here:
https://support.cloudflare.com/hc/en-us/articles/200172516-Which-file-extensions-does-Cloudflare-cache-for-static-content-

How do I ignore query string AND cache HTML???

Thank you,
Evan Jerkunica

Please do not double post:

Can you please delete this one then? The other one has the correct urls.

i am sure @sdayman will merge :wink:

This topic was automatically closed after 14 days. New replies are no longer allowed.