Skip to main content
The Ignore query string and Ignore Set-Cookie options control how query parameters and Set-Cookie response headers affect CDN caching. Both are available in the Cache section of CDN resource settings.

Query string setting

The Ignore query string option determines how the CDN caches URLs that have query parameters. Query parameters are optional key-value pairs separated by = and joined by &, appearing at the end of a URL after a ?:
When disabled, the full query string is included in the cache key, so URLs with different query parameter values are cached as separate objects. To enable it in the Gcore Customer Portal:
  1. In the left sidebar, select CDN, then click the CDN resource to configure.
CDN resources list
  1. In the sidebar, under Cache, click Query string.
Resource settings — Query string section in the Cache group
  1. Enable the Ignore query string toggle.
Enabling or changing this option may invalidate cached content for URLs with query strings. CDN servers will request those files from the origin again, which can increase origin load.
  1. Click Save changes.
The enabled option has three modes:
  • Ignore all (default). Files with different query parameters are cached as a single object, regardless of parameter values.
Ignore all mode selected
The following URLs are cached as a single object because all parameters are ignored:
  • Ignore all except. Files with the specified query parameters are cached as separate objects; files with other parameters are cached as a single object. Enter each parameter name on a separate line in the text field that appears.
Ignore all except mode with parameter text field
With id in the text field: the following URLs are cached as separate objects because the id values differ, and the color parameter is ignored:
With color in the text field: the following URLs are cached as a single object because the color values are the same, and the id parameter is ignored:
  • Ignore only. Files with the specified query parameters are cached as a single object; files with other parameters are cached as separate objects. Enter each parameter name on a separate line in the text field that appears.
Ignore only mode with parameter text field
With id in the text field: the following URLs are cached as a single object because the id values are ignored, and the color values are the same:
With color in the text field: the following URLs are cached as separate objects because the color values are ignored, and the id values differ:
By default, the CDN caches files with different Set-Cookie header values as separate objects. This means multiple cached copies of the same content can accumulate for different cookie values, reducing the cache hit ratio. The Ignore Set-Cookie option changes this behavior: files are cached as a single object regardless of the Set-Cookie header value. Gcore recommends enabling this option for the best cache hit ratio. To enable it, open the CDN resource settings (same page as the Query string option), enable the Ignore Set-Cookie toggle in the Cache section, then click Save changes.
Set-Cookie section with Ignore Set-Cookie toggle