cesiumWorkerBootstrapper does not have cache busting

Created on 23 Jul 2020  路  4Comments  路  Source: CesiumGS/cesium

Latest cesium version has changed the file cesiumWorkerBootstrapper

yet under Build/Cesium/Workers/ the file cesiumWorkerBootstrapper does not have cache busting, i.e no hash to this file. most other files seems ok.

which caused to latest version to break until hard refresh is done.

Most helpful comment

Doesn't this apply to all files in the library that are served statically and fetched at runtime?

True. yet, cesium is a bit different. since cesium is the one who fetches the files under /Workers and by that cesium lib requirement is to provide statically served files directly from the node_modules

This also can be seen on every cesium installation guide, especially with webpack

https://cesium.com/docs/tutorials/cesium-and-webpack/

See the lines here :

new CopywebpackPlugin([ { from: path.join(cesiumSource, cesiumWorkers), to: 'Workers' } ]),

So normally you are correct, the app installing the library should take care of the hashing and caching of the files, but some files in cesium are required to be fetched by cesium, so cesium library expects the files to be exist.

Also most of the files under /Workers do have cache busting, cesiumWorkerBootstrapper is one of the few files which does not.

All 4 comments

Doesn't this apply to all files in the library that are served statically and fetched at runtime? And that could be something the application can handle based on how you're serving those files/by serving them under a folder like Cesium/1.71/Build/ etc.

Doesn't this apply to all files in the library that are served statically and fetched at runtime?

True. yet, cesium is a bit different. since cesium is the one who fetches the files under /Workers and by that cesium lib requirement is to provide statically served files directly from the node_modules

This also can be seen on every cesium installation guide, especially with webpack

https://cesium.com/docs/tutorials/cesium-and-webpack/

See the lines here :

new CopywebpackPlugin([ { from: path.join(cesiumSource, cesiumWorkers), to: 'Workers' } ]),

So normally you are correct, the app installing the library should take care of the hashing and caching of the files, but some files in cesium are required to be fetched by cesium, so cesium library expects the files to be exist.

Also most of the files under /Workers do have cache busting, cesiumWorkerBootstrapper is one of the few files which does not.

@mramato are you aware of this? I've looked into the gulp file and I saw that cesiumWorkerBootstrapper file is excluded from being minified and contain hashed file name, the file is also being hard coded consumed, which is problematic if the filename will contain hash.

Our distro, C137.js can help with this issue since you can cache bust the single file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thw0rted picture thw0rted  路  4Comments

nikakhov picture nikakhov  路  4Comments

hanbollar picture hanbollar  路  4Comments

puckey picture puckey  路  4Comments

OmarShehata picture OmarShehata  路  4Comments