Skip to content

Improve assets versioning method #16

Open
@ujeenator

Description

@ujeenator

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions