Archive
This post is archived and may contain outdated information. It has been set to 'noindex' and should stop showing up in search results.
This post is archived and may contain outdated information. It has been set to 'noindex' and should stop showing up in search results.
Determine If a File or Page Was Served by CloudFlare and If It Was Cached
Nov 24, 2015Web DevelopmentComments (2)
Open Developer Tools in Chrome or Internet Explorer, or Inspector in Firefox (shortcut is F12 in all browsers), and find the Network tab. This is the tab that shows you all http requests made and will look a little different on each browser. It may not be populated until you refresh the page you're on or visit a site after having the window open.
Network Tab
Once there are results in the Network tab, click on a request that you want to analyize and check for two CloudFlare response headers: CF-RAY and CF-Cache-Status. The CF-RAY response header is a unique ID from CloudFlare, and indicates that the resource was served through CloudFlare. The CF-Cache-Status response header indicates specifically if the file was from the cache or not.
If the value of CF-Cache-Status is HIT, then that resource was served from CloudFlare's cache. If there is no CF-Cache-Status response header or it has a value of MISS or EXPIRED, then the file was not served from the CloudFlare cache. This usually occurs if it's the first time a file has been browsed to or if the file is dynamic (PHP, ASP, etc).
Network Tab
Once there are results in the Network tab, click on a request that you want to analyize and check for two CloudFlare response headers: CF-RAY and CF-Cache-Status. The CF-RAY response header is a unique ID from CloudFlare, and indicates that the resource was served through CloudFlare. The CF-Cache-Status response header indicates specifically if the file was from the cache or not.
If the value of CF-Cache-Status is HIT, then that resource was served from CloudFlare's cache. If there is no CF-Cache-Status response header or it has a value of MISS or EXPIRED, then the file was not served from the CloudFlare cache. This usually occurs if it's the first time a file has been browsed to or if the file is dynamic (PHP, ASP, etc).