hypothesis / h-assets

Pyramid views for serving collections of compiled static assets
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Cache-busting issues with static assets #21

Open robertknight opened 7 years ago

robertknight commented 7 years ago

Note: This issue was originally filed against the h project, before we extracted the h-assets package and started using it across different projects.

Current issues with static assets and cache busting

Proposed changes

robertknight commented 1 year ago

Status update for May 2023: The code for serving static assets was extracted into the h-assets package. That still uses query strings as cache busters, but it does validate them and return a 404 if the cache buster query string is invalid.

This resolves the first problem where Sentry could end up receiving a bug report for version X and end up fetching the static asset for a later release Y.

However this problem is still open:

Sourcemap URLs do not include cache-busting tokens

The challenge here is that the sourcemap URL is part of the JS / CSS bundle generated by Rollup or PostCSS respectively.