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

Feature Request: Create new and remove old asset files as option for dump #853

Open
MicWit opened this issue Jun 2, 2017 · 1 comment
Open

Comments

@MicWit
Copy link

MicWit commented Jun 2, 2017

When doing an assetic dump, the same file names are used every time you do a dump. This could potentially cause issues if a file is cached and the CSS source has been updated. Would it be possible to compare the code of what is about to be dumped into the file with the code that is already in there and then if it is different, delete the old file and create a new one with a different name?

This would mean that every time you do a dump, every asset that has been modified (the resulting asset, adding comments etc won't make a difference if you are minimizing) would change names and when the browser loads the CSS you would know its loading the new version.

@aik099
Copy link

aik099 commented Jun 2, 2017

It can be done by using CacheBustingWorker (see https://github.com/kriswallsmith/assetic#cache-busting). This way generated filename would always include hash from compiled content.

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

2 participants