skip to Main Content

I know what is the difference between Azure CDN query string modes and I have read a helpfull example of query string modes but…

I don’t understand what is the purpose of "Ignore query strings" or how this can be useful in a real dynamic web.

For example, suppose we have a product purchase website with a URL similar to www.myweb.com/products?id=3

If we use "Ignore query strings"… Does this mean that if an user later requests product 4 (www.myweb.com/products?id=4), he will receive the page for product 3?

I think I’m not understanding correctly Azure CDN, I’m seeing Azure CDN as a dynamic content CDN, however Azure CDN is only used for static content as this article explains:

Standard content delivery network (CDN) capability includes the ability to cache files closer to end users to speed up delivery of static files.

This is correct? Any help or example on the subject is welcome

2

Answers


  1. Chosen as BEST ANSWER

    Now that I have it clearer, I will answer my question:

    Azure CDN - Used to cache static content, even on dynamic web pages.

    For the example in the question, all products must download the same javascript and css content, for those types of files Azure CDN is used. Real example using "Ignore query strings":

    • User A www.myweb.com/products?id=3, jquery-versionX.js and mystyles.css are not cached, the server is requested and the user receives it.

    • User B www.myweb.com/products?id=4, since we are using "Ignore query strings" the jquery-versionX.js and mystyles.css files are cached, they are served to the user without requesting it from the server again.

    • User C www.myweb.com/products?id=3, since we are using "Ignore query strings" the jquery-versionX.js and mystyles.css files are cached, they are served to the user without requesting it from the server again.

    Reddis or other similar - Used to cache dynamic content (queries to databases for example).

    For the example in the question, all the products have different information, which is obtained by doing a database query. We can store those queries or JSON objects in a Reddis cache. Real example:

    Summary:

    Both methods can be used simultaneously, Azure CDN is for static content and Reddis or similar for dynamic content.


  2. Yes, if you are selected Ignore query strings Query string caching behavior (this is the default), in your case subsequent requests after the initial request http://www.myweb.com/products?id=3, no matter the query string value, that POP server will serve the same content until it’s cache period expires.

    And for the second question, CDN is all about serving static files. To my understanding i believe what the article says is about dynamic site accelaration. It’s about bunch of techniques to optimize dynamic web sites content serving performance. Because unlike static web sites, dynamic web sites assets (static files. ex: images, js, css, html) are loading dynamically based on the user behavior.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search