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

Option setting
• Ignore All
• Ignore All Except
• Ignore Only

The Ignore Query String option determines how the CDN will cache URLs that have query parameters. Query parameters are optional pairs of key and value separated by an equal sign (=) and joined by an ampersand (&), that appear at the end of a URL following a question mark (?). For example:

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

Option setting

This option is disabled by default. To enable it via the control panel:

1. Go to CDN and select the CDN resource you want to configure.

CDN_resource.png

2. In the navigation panel, under the Cache section, click Query string.

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

    Ignore_All_option.png

    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.

    In the Parameter field, enter each parameter on a separate line.

    Ignore_All_Except.png

    For example, you specified id in the Parameter field. The following files will be cached as objects with different keys because the values of the id parameter are different, and the value of the color parameter will be ignored.

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

    For example, you specified color in the Parameter field. The following files 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.

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

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

    In the Parameter field, enter each parameter on a separate line.

    Ignore_Only.png

    For example, you specified id in the Parameter field. The following files 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.

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

    For example, you specified color in the Parameter field. The following files 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.

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

Was this article helpful?
Recently viewed articles