How to check whether content is getting served from CDN cache or CDN edge server

Statement - How to check whether content is getting served from CDN cache or CDN edge server


Solution : 
  • Use below online tools to verify the Gzip compression and Cache status from CDN
  • Key in your website URL
  • Observe the results and search for 
  1. Content-Encoding: gzip  This indicates Gzip enabled for the website.
  2. X-Cache: Hit from cloudfront - This indicate when requests are served from the closest CloudFront/CDN edge location.
  3. X-Cache:Miss from cloudfront" when the request is sent to the origin and "Miss" requests might be slower to load because of the additional step of forwarding to the origin.
  4. X-Frame-Options: SAMEORIGIN - provide clickjacking protection by not allowing rendering of a page in a frame. This can include rendering of a page in a fram,iframe, or object The SAMEORIGIN directive allows the page to be loaded in a frame on the same origin as the page itself.


Domain Name
https://www.abc.com/
Compressed size
5662
Uncompressed size
31897

Was saved by compressing this page with GZIP.
Header Information
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Content-Length: 5662
Connection: keep-alive
Date: Fri, 07 Dec 2017 10:51:12 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Cache-Control: public, max-age=0, s-maxage=86400
Accept-Ranges: bytes
Content-Encoding: gzip
x-platform: cf5-3
Vary: Accept-Encoding
Age: 89
X-Cache: Hit from cloudfront
Via: 1.1 68e4011ca1c00bec92bb202e1ddce131.cloudfront.net (CloudFront)
X-Amz-Cf-Id: -fKsscKYxW5jusS5LZ-f3sqIHIG34RJXydvw-JlXczZkF3168snvjQ==

No comments:

Post a Comment