Query Strings


Query Strings are a formed as part of a URL. They are used to pass information between the client and the server. In order to have a website that is not only static, but dynamic, data needs to be passed and this is achieved via cookies, session states and query strings. As explained previously in this document, the query string is the portion of the URL after the “?”.

Example: https://www.done.com/hello.html?querystring=welcomepage

Query Strings and CDN

Question/Statement Information/Best Practice
What does a CDN do with query strings? A CDN can manipulate query strings in several ways.

  • Query strings can be dropped before a URL is cached.
  • URL’s with query strings can be cached as different instances.
  • Query strings can be cached but dropped when passing the request or response to the browser/server.

Please ensure the CDN configuration for each application is checked and setup correctly.

CDN and Cache Key Parameters A CDN can also manipulate query strings and can:

  • Remove
  • Add
  • Reorder
  • Amend

Cache key parameters. If this is required, it is fairly easy to achieve on the CDN but will most likely require a unique configuration for each application (a one-to-one relationship).

Query Strings and Servers Note, by default servers will not read query strings. This is an obvious statement, but applications need
to be created to read query string data and make use of it. This is mentioned in this document because many developers will look at the CDN before the server.