Dynamically version cache of files on browser side
up vote
0
down vote
favorite
I'm working on a web project where we use Nginx to serve static files. I'd like to add the version on static files so that we could force the client to update static files that have been edited. Right now we handle that issue manually on each file by adding the version of the file (... scr="file.js?v=1234" ...
) but they are more and more files on the project.
I need help, an advice to dynamically handle files versions on server with Nginx so that when we edit the file the version change dynamically and the client can automatically update to a newer version.
If it's seems to be impossible to handle with Nginx, I'm also open for all others solutions or advices.
Thanks
nginx caching browser-cache static-files
add a comment |
up vote
0
down vote
favorite
I'm working on a web project where we use Nginx to serve static files. I'd like to add the version on static files so that we could force the client to update static files that have been edited. Right now we handle that issue manually on each file by adding the version of the file (... scr="file.js?v=1234" ...
) but they are more and more files on the project.
I need help, an advice to dynamically handle files versions on server with Nginx so that when we edit the file the version change dynamically and the client can automatically update to a newer version.
If it's seems to be impossible to handle with Nginx, I'm also open for all others solutions or advices.
Thanks
nginx caching browser-cache static-files
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm working on a web project where we use Nginx to serve static files. I'd like to add the version on static files so that we could force the client to update static files that have been edited. Right now we handle that issue manually on each file by adding the version of the file (... scr="file.js?v=1234" ...
) but they are more and more files on the project.
I need help, an advice to dynamically handle files versions on server with Nginx so that when we edit the file the version change dynamically and the client can automatically update to a newer version.
If it's seems to be impossible to handle with Nginx, I'm also open for all others solutions or advices.
Thanks
nginx caching browser-cache static-files
I'm working on a web project where we use Nginx to serve static files. I'd like to add the version on static files so that we could force the client to update static files that have been edited. Right now we handle that issue manually on each file by adding the version of the file (... scr="file.js?v=1234" ...
) but they are more and more files on the project.
I need help, an advice to dynamically handle files versions on server with Nginx so that when we edit the file the version change dynamically and the client can automatically update to a newer version.
If it's seems to be impossible to handle with Nginx, I'm also open for all others solutions or advices.
Thanks
nginx caching browser-cache static-files
nginx caching browser-cache static-files
edited Nov 24 at 1:34
asked Nov 10 at 22:35
Moussa
788
788
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
after some research, I found a way to dynamically version cache of files using webpack. It does exactly what I was searching for. The article is quit well explained here. It uses a hash function to identify changes on a file and add the hash in his name.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
after some research, I found a way to dynamically version cache of files using webpack. It does exactly what I was searching for. The article is quit well explained here. It uses a hash function to identify changes on a file and add the hash in his name.
add a comment |
up vote
0
down vote
accepted
after some research, I found a way to dynamically version cache of files using webpack. It does exactly what I was searching for. The article is quit well explained here. It uses a hash function to identify changes on a file and add the hash in his name.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
after some research, I found a way to dynamically version cache of files using webpack. It does exactly what I was searching for. The article is quit well explained here. It uses a hash function to identify changes on a file and add the hash in his name.
after some research, I found a way to dynamically version cache of files using webpack. It does exactly what I was searching for. The article is quit well explained here. It uses a hash function to identify changes on a file and add the hash in his name.
edited Nov 24 at 1:37
answered Nov 24 at 1:32
Moussa
788
788
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244105%2fdynamically-version-cache-of-files-on-browser-side%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown