Skip to content

Commit

Permalink
feat: Adding cache buster for async script loading
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Jul 27, 2022
1 parent 892ac66 commit a38c901
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/fibr/templates/async-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
});
}

resolveScript('/scripts/modern_detection.js')
resolveScript('/scripts/modern_detection.js?v={{ .Version }}')
.then(() => {
if (window.modernBrowser) {
resolveScript('/scripts/thumbnail.js');
resolveScript('/scripts/thumbnail.js?v={{ .Version }}');
} else {
resolveScript('/scripts/thumbnail/web.js')
resolveScript('/scripts/thumbnail/web.js?v={{ .Version }}')
}
})
.catch(() => resolveScript('/scripts/thumbnail.js'));
.catch(() => resolveScript('/scripts/thumbnail.js?v={{ .Version }}'));
</script>

</script>
Expand Down

0 comments on commit a38c901

Please sign in to comment.