We are currently busting all assets on a new build which is unnecessary. If we make use of the chunkhash instead of hash we can expire only assets that should be expired. Right now, our vendor will not change very often and might be as much as 2MB(!) to load. The things we do iterate on, our editor and all other application javascript is usually less than 10K so it makes sense to only expire this resource, we will save bandwidth and so will the client, and reduce loading times.
To do this however we also need to replace our ASSET_FINGERPRINT with eg. ASSET_APPLICATION_FINGERPRINT and ASSET_VENDOR_FINGERPRINT.
Example
Instead of /javascripts/[name]-[hash].js we should use /javascripts/[name]-[chunkhash].js.
What
We are currently busting all assets on a new build which is unnecessary. If we make use of the
chunkhash
instead ofhash
we can expire only assets that should be expired. Right now, our vendor will not change very often and might be as much as 2MB(!) to load. The things we do iterate on, our editor and all other application javascript is usually less than 10K so it makes sense to only expire this resource, we will save bandwidth and so will the client, and reduce loading times.To do this however we also need to replace our
ASSET_FINGERPRINT
with eg.ASSET_APPLICATION_FINGERPRINT
andASSET_VENDOR_FINGERPRINT
.Example
Instead of
/javascripts/[name]-[hash].js
we should use/javascripts/[name]-[chunkhash].js
.