Caching Score: https://www.bcls.lib.nj.us/

Summary

GradeA+

593/603

Requested URL checks

What is this check, and why should you care

Having a cache hit ensures the fastest possible delivery of content to end users.

The response header X-Cache had a value of HIT.

Fastly has documentation on how to interpret the X-Cache header.

Maximum possible points

100

What is this check, and why should you care

Using a long cache lifetime helps to ensure a high cache hit rate.

In order to get maximum points, your cache lifetime must be greater than or equal to 4 weeks. If your cache lifetime is less, then you will get some proportion of the score based on how close to 4 weeks you are.

Current cache lifetime is 2764800 seconds (1 month and 4 days).

You can read more about which headers Fastly uses to indicate the cache lifetime.

Maximum possible points

100

What is this check, and why should you care

Using a CDN is extremely useful for caching purposes.

Maximum possible points

50

What is this check, and why should you care

The time that it takes for a user's browser to receive the first byte of page content.

The lower the TTFB, the faster your site will be perceived by the end user.

In order to get maximum points, your TTFB must be less than or equal to 30ms. If your TTFB is more than 1 second then you get no points here.

Maximum possible points

50

What is this check, and why should you care

Using ETag identifiers is an easy way to ensure your visitors are always getting the most up-to-date version of the content. This mechanism allows caches to be more efficient and saves bandwidth, as a Web server does not need to send a full response if the content has not changed. HTTP 304 responses are used to indicate this is working.

An HTTP request with the request header If-None-Match with a value of W/"1736752521" was sent, and an HTTP 304 was responded with.

See the Wikipedia page on ETag for more background.

In order to get maximum points, you need to have ETag identifiers and an HTTP 304 response must be received when using a valid If-None-Match request header.

Maximum possible points

30

What is this check, and why should you care

Using Last-Modified headers is an easy way to ensure your visitors are always getting the most up-to-date version of the content. HTTP 304 responses are used to indicate this is working.

An HTTP request with the request header If-Modified-Since with a value of was sent, and an HTTP 304 was responded with.

Maximum possible points

30

What is this check, and why should you care

Having tiered caching can help improve the cache hit ratio of your site because it provides an additional layer of caching in front of your origin.

Maximum possible points

25

What is this check, and why should you care

Caching HTTP 404s is a great way to offload requests from your origin.

In order to get maximum points, you need to have the ability to cache an HTTP 404 for any amount of time.

This check requested the URL https://www.bcls.lib.nj.us/cachingscorebrokenurltest.

Maximum possible points

20

What is this check, and why should you care

Drupal 8+ provides an Internal Page Cache module that is recommended for small to medium-sized websites.

There is extremely limited value in using this module, even when you are using Fastly and having a relatively high cache lifetime of 1 month and 4 days.

In order to get maximum points, you must have the module page_cache disabled.

See Drupal's documentation on the Internal Page Cache module. Also, Wim Leers wrote a really awesome blog post on the release of this module with important background.

Maximum possible points

20

What is this check, and why should you care

CSS aggregation reduces the number of assets your site needs to download. The filename contains a hash of all the file contents, meaning you can cache these files for an extremely long time with no negative consequences.

Maximum possible points

10

What is this check, and why should you care

Javascript aggregation reduces the number of assets your site needs to download. The filename contains a hash of all the file contents, meaning you can cache these files for an extremely long time with no negative consequences.

Maximum possible points

10

What is this check, and why should you care

Drupal 9.5+ introduces a new debug setting to make it easier to debug render caching. This setting will add cache debugging output for each rendered element.

The main issue with this is that this slows down your page loads (on top increasing your page weight).

In order to get maximum points, you must disable the render cache debug.

Maximum possible points

10

What is this check, and why should you care

Drupal 7+ provides a Statistics module to which records content view statistics in Drupal's database.

The main issue with this module is that it sends an un-cacheable HTTP POST request to your site to record a 'content view' statistic. This does not scale well as you Drupal site gets more traffic.

In order to get maximum points, you must disable the statistics module.

Maximum possible points

10

What is this check, and why should you care

Drupal 8+ uses Twig for templating, and the Twig template engine offers a debug tool to which emits out a list of template filenames in the HTML source.

The main issue with this is that you often also have other Twig related performance issues as well, e.g. automatic reloading.

In order to get maximum points, you must disable Twig debug.

Maximum possible points

10

What is this check, and why should you care

You can increase the cache hit rate of your site by stripping certain query parameters from the cache key.

FBCLID is one such parameter that can be stripped by your caching server. This query parameter only really serves a purpose for Javascript to read, and Javascript can still read it from the browser URL.

You can add this VCL snippet to your Fastly service (in the recv subroutine). Fastly documentation on querystring.filter.

This check requested the URL https://www.bcls.lib.nj.us/?fbclid=1736754195.

Maximum possible points

10

What is this check, and why should you care

You can increase the cache hit rate of your site by stripping certain query parameters from the cache key.

GCLID and GCLSRC are two such parameters that can be stripped by your caching server. These query parameters only really serve a purpose for Javascript to read, and Javascript can still read it from the browser URL.

You can add this VCL snippet to your Fastly service (in the recv subroutine). Fastly documentation on querystring.filter.

This check requested the URL https://www.bcls.lib.nj.us/?gclsrc=1736754195&gclid=1736754195.

Maximum possible points

10

What is this check, and why should you care

You can increase the cache hit rate of your site by stripping certain query parameters from the cache key.

UTM is a collection of parameters that can be stripped by your caching server. These query parameters only really serve a purpose for Javascript to read, and Javascript can still read them from the browser URL.

You can add this VCL snippet to your Fastly service (in the recv subroutine). Fastly documentation on querystring.filter.

This check requested the URL https://www.bcls.lib.nj.us/?utm_source=1736754196&utm_medium=1736754196&utm_campaign=1736754196&utm_id=1736754196.

Maximum possible points

10

What is this check, and why should you care

There is a SPAM protection module in Drupal called Honeypot.

The honeypot module has a feature that adds a time based hidden form field to forms to protect against bots filling them in too quickly. This is a nice feature, however it happens to disable caching for the entire page. This is terrible for high traffic sites.

It is recommended to disable this time based feature, and only use the core honeypot feature of a hidden input field.

Maximum possible points

5

What is this check, and why should you care

There are 2 filesystems in Drupal - public files and private files.

Private files force Drupal to bootstrap in order to serve the file, and access control is checked every single time. This is useful for sensitive files, but a hindrance when your site is under high load.

It is recommended to use Drupal's public file system for static, non-sensitive files, and reserve the use of private files for dynamic, or sensitive files.

Maximum possible points

5

What is this check, and why should you care

You can increase the cache hit rate of your site by stripping certain query parameters from the cache key.

TTCLID is one such parameter that can be stripped by your caching server. This query parameter only really serves a purpose for Javascript to read, and Javascript can still read it from the browser URL.

You can add this VCL snippet to your Fastly service (in the recv subroutine). Fastly documentation on querystring.filter.

This check requested the URL https://www.bcls.lib.nj.us/?ttclid=1736754195.

Maximum possible points

10

Image checks

Performed on the asset: https://www.bcls.lib.nj.us/themes/custom/bcls/bcls.png

See the HTTP headers for this image file.

What is this check, and why should you care

Having a cache hit ensures the fastest possible delivery of content to end users.

The response header X-Cache had a value of HIT.

Fastly has documentation on how to interpret the X-Cache header.

Maximum possible points

10

What is this check, and why should you care

Using a long cache lifetime helps to ensure a high cache hit rate.

In order to get maximum points, your cache lifetime must be greater than or equal to 4 weeks. If your cache lifetime is less, then you will get some proportion of the score based on how close to 4 weeks you are.

Current cache lifetime is 2628010 seconds (1 month and 2 days).

You can read more about which headers Fastly uses to indicate the cache lifetime.

Maximum possible points

10

What is this check, and why should you care

Using ETag identifiers is an easy way to ensure your visitors are always getting the most up-to-date version of the content. This mechanism allows caches to be more efficient and saves bandwidth, as a Web server does not need to send a full response if the content has not changed. HTTP 304 responses are used to indicate this is working.

An HTTP request with the request header If-None-Match with a value of "67378e41-6449" was sent, and an HTTP 304 was responded with.

See the Wikipedia page on ETag for more background.

In order to get maximum points, you need to have ETag identifiers and an HTTP 304 response must be received when using a valid If-None-Match request header.

Maximum possible points

3

What is this check, and why should you care

Using Last-Modified headers is an easy way to ensure your visitors are always getting the most up-to-date version of the content. HTTP 304 responses are used to indicate this is working.

An HTTP request with the request header If-Modified-Since with a value of was sent, and an HTTP 304 was responded with.

Maximum possible points

3

CSS checks

Performed on the asset: https://www.bcls.lib.nj.us/sites/default/files/css/css_MtcQUBEM2dIYdXHEEkTLJxD56Ja2bTKx26jGPNT4In8.css?delta=0&language=en&theme=bcls&include=eJxlkEFywyAMRS9EzZEYGeRYrUAUQRPfvpSEsOiG-e8zoydQ8QTsIgYCx5S-1Oq_aqsnRjR6acVod1A0GRgCJQtVor7pkFQX3TBhIf_mEzljWfdRGH1jXI2UGyTSPvHzu2G5XCMH3ksJJN01k9k960s94tM74pQOmMYBSzdwuZ4jIPlrl4fBR_17tA2l9bW2F_YVC9wK5FPnzWq2lnLbmfTEYH4I72rHuUUJXWjocHqno14Z7Qwf0Kp4iZmx9q-lig4YS53TV_MLk_mjjw

See the HTTP headers for this CSS file.

What is this check, and why should you care

Having a cache hit ensures the fastest possible delivery of content to end users.

The response header X-Cache had a value of HIT.

Fastly has documentation on how to interpret the X-Cache header.

Maximum possible points

10

What is this check, and why should you care

Using a long cache lifetime helps to ensure a high cache hit rate.

In order to get maximum points, your cache lifetime must be greater than or equal to 4 weeks. If your cache lifetime is less, then you will get some proportion of the score based on how close to 4 weeks you are.

Current cache lifetime is 2628010 seconds (1 month and 2 days).

You can read more about which headers Fastly uses to indicate the cache lifetime.

Maximum possible points

10

What is this check, and why should you care

Using ETag identifiers is an easy way to ensure your visitors are always getting the most up-to-date version of the content. This mechanism allows caches to be more efficient and saves bandwidth, as a Web server does not need to send a full response if the content has not changed. HTTP 304 responses are used to indicate this is working.

An HTTP request with the request header If-None-Match with a value of W/"6759e1da-54b6" was sent, and an HTTP 304 was responded with.

See the Wikipedia page on ETag for more background.

In order to get maximum points, you need to have ETag identifiers and an HTTP 304 response must be received when using a valid If-None-Match request header.

Maximum possible points

3

What is this check, and why should you care

Using Last-Modified headers is an easy way to ensure your visitors are always getting the most up-to-date version of the content. HTTP 304 responses are used to indicate this is working.

An HTTP request with the request header If-Modified-Since with a value of was sent, and an HTTP 304 was responded with.

Maximum possible points

3

Javascript checks

Performed on the asset: https://www.bcls.lib.nj.us/sites/default/files/js/js_afMNK0CnEgma8EMU4_4hmwkQFcbxieMGPSGmWE0r8FI.js?scope=footer&delta=0&language=en&theme=bcls&include=eJxdjlEKhDAMRC_UtUeS2KZu2JiUJq56-y2oCPv33sBMUlQcNjRdMJaHB_vOYVadGUcQ4MMpWfwPQgWGTBK9gRiDY5gSW4SUtGVSOTU3rVm3yxaU9aQCko5J99MMoaV3wN2Z5NNLa18fLg1URtuo-FEx3vCC1TXpUhn7ZSPvrzE2v7tP8gPUgFp4

See the HTTP headers for this Javascript file.

What is this check, and why should you care

Having a cache hit ensures the fastest possible delivery of content to end users.

The response header X-Cache had a value of HIT.

Fastly has documentation on how to interpret the X-Cache header.

Maximum possible points

10

What is this check, and why should you care

Using a long cache lifetime helps to ensure a high cache hit rate.

In order to get maximum points, your cache lifetime must be greater than or equal to 4 weeks. If your cache lifetime is less, then you will get some proportion of the score based on how close to 4 weeks you are.

Current cache lifetime is 2628010 seconds (1 month and 2 days).

You can read more about which headers Fastly uses to indicate the cache lifetime.

Maximum possible points

10

What is this check, and why should you care

Using ETag identifiers is an easy way to ensure your visitors are always getting the most up-to-date version of the content. This mechanism allows caches to be more efficient and saves bandwidth, as a Web server does not need to send a full response if the content has not changed. HTTP 304 responses are used to indicate this is working.

An HTTP request with the request header If-None-Match with a value of W/"6759e1d4-1c7ed" was sent, and an HTTP 304 was responded with.

See the Wikipedia page on ETag for more background.

In order to get maximum points, you need to have ETag identifiers and an HTTP 304 response must be received when using a valid If-None-Match request header.

Maximum possible points

3

What is this check, and why should you care

Using Last-Modified headers is an easy way to ensure your visitors are always getting the most up-to-date version of the content. HTTP 304 responses are used to indicate this is working.

An HTTP request with the request header If-Modified-Since with a value of was sent, and an HTTP 304 was responded with.

Maximum possible points

3

HTTP Response headers

Name Value
Status Code HTTP 200
Accept-Rangesbytes
Age1674
Cache-Controlmax-age=2764800, public
Connectionkeep-alive
Content-Typetext/html; charset=UTF-8
Content-languageen
DateMon, 13 Jan 2025 07:43:15 GMT
ETagW/"1736752521"
Fastly-Debug-Digest17859f19dbfbc04829b9187428c916e393361a9b032033ed67eefad9192e8235
Fastly-Debug-Path(D cache-syd10140-SYD 1736754195) (F cache-syd10146-SYD 1736754195) (D cache-iad-kjyo7100076-IAD 1736754195) (F cache-iad-kjyo7100076-IAD 1736752521)
Fastly-Debug-TTL(H cache-syd10140-SYD - - 1674) (H cache-iad-kjyo7100076-IAD 2763126.237 86400.000 1674)
Fastly-Drupal-HTMLYES
Fastly-Drupal-VCL-Uploaded8-1.0.2
Last-ModifiedMon, 13 Jan 2025 07:15:21 GMT
Surrogate-Controlmax-age=2764800, public
Surrogate-Key9BgZ 6qG+ sILF eKBo nzcO FhPZ 9tF6 TP6P reOC 53nf d9wT IrkJ MoII a1ui XJTh W+03 5y1g OcZL kA6I exRm ZpjV 4cys u1k8 ZOUS bY/y bynY sUEy lhyx m61P 39sm fwHp Ntb8 1eFZ ZLsc jTjt B+dM KFZD rMS7 h3yu pmib oEPH cQuZ vXuC i3L8 la7i B7Xl e0n6 X6k9 qZv5 eJzU 5nl5 Hb4e +fZ5 TBcz jH/I L1Ww xmHJ jhyC XBry iRJ6 jLIS Wq1o 7XRp LC6W 8iNk bdvc kZD+ PPDv 5clF O+G/ zqU6 dGxu yMpb KoNP H1x9 4A3K LdHW Ff4m +Rxx Zozy Lw8E 8nr4 UMWL 8rPX v5Wo vOfW 90o3 GwSU vsk/ 6Hi8 79aV A6+a vGEE 61k7 IjDL OhUA IjJ1 n4VA NWFp Vo7z PE1h +BbI 3tDP Kojm 1I4W tBC5 k9J0 rIKx kA9Q HfQv BFI9 1UxQ THmB 6Lux y0gl NLCZ 5vOd L0k3 0qtR i/hg o/w7 9yYX /EnD x8yO 6B+R MOa/ doiq 9UoV qXXw lWe4 zAYx Uvmb mXDe e9FN eo2C 0/zX m9eV Vds/ 5Z5Z F+0C hSGo GGZj M50d iJWa Jho6 qcXj aR3H Qeox www.bcls.lib.nj.us
VaryCookie, Accept-Encoding
Via1.1 varnish
X-Admin-Path0
X-Basic-Auth0
X-CacheHIT
X-Cache-Hits1
X-Client-IpREDACTED
X-Country-CodeAU
X-Drupal-Dynamic-CacheHIT
X-Ip-Allowed0
X-LAGOONamazeeio-us2>ingress-nginx>bcls01-f2-live:nginx>nginx-6999694dc9-688c5
X-Lagoon-Environmentbcls01-f2-live
X-Module-Path0
X-Monitoring-Bot0
X-Proxy-Descriptioncloud
X-Proxy-Typehosting
X-Served-Bycache-syd10140-SYD
X-Theme-Path0
X-TimerS1736754195.272952,VS0,VE1
X-Tor-Node0
X-User-Login-Path0
X-Waf-Block0
X-Waf-Block-Id0
x-encoded-content-encodinggzip
x-encoded-content-length13137

If you want to do this yourself

You can use the following cURL command:

curl -sLIXGET -H 'Fastly-Debug: 1' 'https://www.bcls.lib.nj.us/' | sort