← Back to release summary

CacheStorage Code Cache Hint

Category
Service Worker
Type
New or changed feature
Status
Origin trial (Chrome 80)
Intent stage
Dev trials

Summary

This experiment will allow participating sites to provide hints to cache_storage that full code cache should not be generated in a service worker install event. The hint will be communicated as a header on the Response being stored. This is a change to an unspecified optimization in chrome. Full code cache generation during the install event was added in M64. It is only observable indirectly through changes in timing and disk quota usage.

Motivation

There are clear trade-offs to generating full code cache.  Partners have told us it clearly improves load times.  The binaries are quite larger, however, and also lead to increased disk and runtime memory usage. We have a partner interested in providing hints so that they can gain the loading benefits for critical scripts and avoid the binary bloat for non-critical scripts. If the data shows a benefit we will investigate standardizing a hinting mechanism.

Standards & signals

Docs: https://docs.google.com/document/d/1egza-w5KA7-03T5zZtQTwBNWAg2zHxFFoOS2UgMdAh8/edit#

Explainers: https://docs.google.com/document/d/1egza-w5KA7-03T5zZtQTwBNWAg2zHxFFoOS2UgMdAh8/edit#

View on chromestatus.com