Query-String. Ignore Query-String when caching content on CDN servers

This option determines how to cache files with different query parameters. A query parameter is a unique query string (the parameter after the question mark) in the URL. For example: http://cdn.example.com/photo.jpeg?id=6&color=blue
http://cdn.example.com/photo.jpeg?id=1&color=blue

This option is disabled by default. To enable it, go to the "CDN" tab in the "CDN Resources" section and click "Settings" next to the CDN resource. Click on "Show advanced settings", in the "Cache" section - > "Add option" find the "Ignore Query String" option.

1575276946283.png

The enabled option has 3 modes:

  • Ignore All. Selected by default. Files with different query parameters are cached as objects with the same key regardless of the parameter value.

For example, the following files will be cached as objects with a single cache key, because all parameters will be ignored:

http://cdn.example.com/photo.jpeg?id=6&color=blue
http://cdn.example.com/photo.jpeg?id=1&color=blue

  • Ignore All Except. Files with the specified query parameters are cached as objects with different keys, files with other parameters are cached as objects with the same key. Each parameter should be entered as a separate line.

For example, you specified the id parameter.

Files
http://cdn.example.com/photo.jpeg?id=6&color=blue
http://cdn.example.com/photo.jpeg?id=1&color=blue
will be cached as objects with different keys, because the values of the id parameter are different, the value of the color parameter will be ignored.

You specified the color parameter.

Files
http://cdn.example.com/photo.jpeg?id=6&color=blue
http://cdn.example.com/photo.jpeg?id=1&color=blue
will be cached as objects with the same keys, because the values of the color parameter are the same, and the id parameter will be ignored.

  • Ignore only. Files with the specified query parameters are cached as objects with the same key, files with other parameters are cached as objects with different keys.
    Each parameter should be entered as a separate line.

For example, you specified the id parameter.

Files
http://cdn.example.com/photo.jpeg?id=6&color=blue
http://cdn.example.com/photo.jpeg?id=1&color=blue
will be cached as objects with the same keys, because the values of the id parameter will be ignored, and the values of the color parameters are the same.

You specified the color parameter.

Files
http://cdn.example.com/photo.jpeg?id=6&color=blue
http://cdn.example.com/photo.jpeg?id=1&color=blue
will be cached as objects with different keys, because the values of the color parameter will be ignored, and the values of the id parameters are different.

Was this article helpful?
Recently viewed articles