codefrau / SqueakJS

A Squeak Smalltalk VM in Javascript
https://squeak.js.org
MIT License
365 stars 75 forks source link

Detect when an image/changes ZIP is updated. #79

Open ccrraaiigg opened 7 years ago

ccrraaiigg commented 7 years ago

Currently, if an image/changes pair is delivered via ZIP, and then updated, the new ZIP is not downloaded and unpacked, and the old image/changes are used (tested with Chrome 54).

codefrau commented 7 years ago

That's intentional, both to speed up loading on the second run, and to not lose your work if you snapshotted the image under the same name. So if the named image exists, it will not be overwritten. We do have the forceDownload option, but that will always download all the files. We would have to have a way to identify the image and force an update ... not quite sure how it should work.

ccrraaiigg commented 7 years ago

Perhaps we could at least give a notification to the user when the server's ZIP changes, or when the server's image file changes if it's not part of a ZIP. Then the user could decide what to do. We could devise a convention for storing multiple derivative images in the indexed db.