Scott Reed
Jul 10, 2019
  2096
(5 votes)

View DXC Cache Status Easier In DevTools

When running on the DXC Episerver uses https://www.cloudflare.com/ for it's CDN caching to increase performance.

As most should know when viewing a request in DevTools you can open the request in DevTools and look at the headers and check cf-cache-status to check if a resource has been cached by checking for a HIT response.

We can then look at the cache cache-control header to see for how long e.g. public, max-age 86400 is cached for 24 hours with a HIT to say it's cached.

However it's a bit of a pain to have to click in to all of these, so let's use a not as well known feature of being able to add custom headers to the network requests panel.

Step 1.

In network on DevTools right click the headers area as such

Step 2.

Navigate to Response Header -> Manage Custom Headers

Step 3.

Add in the header cf-cache-status which indicates if it's been cached

Result

Now you'll see a HIT or MISS or Empty (If not going through CloudFlare) giving a lot easier way to see if your resources are being cached.

Easy :-)

Jul 10, 2019

Comments

Stefan Holm Olsen
Stefan Holm Olsen Jul 10, 2019 02:24 PM

Nice and simple tip, Scott. 👍

Jacob Pretorius
Jacob Pretorius Jul 11, 2019 10:27 AM

That's useful thanks for the tip!

Ravindra S. Rathore
Ravindra S. Rathore Jul 15, 2019 12:29 PM

Very helpful tip 👍

Please login to comment.
Latest blogs
Optimizely For you Intranet

Having been at Optimizely and in the CMS industry for nearly 16 years I have seen clients’ intranet requirements go from a simple site just to hous...

Robert Folan | Sep 22, 2023

Vulnerability in EPiServer.GoogleAnalytics v3 and v4

Introduction A potential security vulnerability was detected for Optimizely Google Analytics addon (including EPiServer.GoogleAnalytics and...

Bien Nguyen | Sep 20, 2023

Overriding Optimizely’s Content Recommendations Block to Implement Custom Recommendations

Introduction The Content Recommendations add-on for Optimizely CMS dynamically recommends content from your site tailored to the interests of each...

abritt | Sep 13, 2023 | Syndicated blog

Developer contest! Install the AI Assistant and Win Bose QC45 Headphones!

We are thrilled to announce a developer contest where you have the chance to win a pair of Bose Headphones. The goal is to be the first developer t...

Luc Gosso (MVP) | Sep 7, 2023 | Syndicated blog

Send Optimizely notifications with SendGrid API, not SMTP

If your Optimizely site already sends transaction emails through an email platform API, why not do the same with Optimizely notification emails?

Stefan Holm Olsen | Sep 6, 2023 | Syndicated blog

Optimizely Configured Commerce Custom POST API

Introduction When creating custom API controllers for an Optimizely B2B project it’s possible you’ll want to create POST calls. Following the...

Dylan Barter | Sep 6, 2023