Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve assets versioning method #16

Open
ujeenator opened this issue Dec 5, 2018 · 0 comments
Open

Improve assets versioning method #16

ujeenator opened this issue Dec 5, 2018 · 0 comments

Comments

@ujeenator
Copy link

Current assets versioning implies, that any change in assets will result in new path for every asset, even if most of them was not changed, e.g. we have:

https://assets.myapp.com/v1.0.0/main.js
https://assets.myapp.com/v1.0.0/lib-a.js
https://assets.myapp.com/v1.0.0/lib-b.js <- we change this one

now we have:

https://assets.myapp.com/v1.1.0/main.js
https://assets.myapp.com/v1.1.0/lib-a.js
https://assets.myapp.com/v1.1.0/lib-b.js

And the problem is that cache for assets that was already downloaded from v1.0.0 will be useless, now browser will download their copies from v1.1.0

The better method could be adding version for individual assets (like most of JS libraries do):

https://assets.myapp.com/main-v1.0.0.js
https://assets.myapp.com/lib-a-v1.0.0.js
https://assets.myapp.com/lib-b-v1.0.0.js <- we change this one

https://assets.myapp.com/lib-b-v1.1.0.js <- now we have only 1 asset changed, all other cache is kept

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant