DynamicFileVersion 0.1-beta

DynamicFileVersion 0.1-beta

Released Aug 07, 2018 by dsteuer

This snippet appends a dynamic version to the call of a css-file, js-file or image, so the user doesn’t have to refresh it’s browsercache actively when the file 

was changed. Its a simple, automatic browsercachebreaker for files based on their file change time.

Download 10kb (66 downloads)
Downloads: 66
License: GPLv2
Requires Revolution 2.5.x or greater
Supports mysql

v0.1 - First release

Installation Instructions

Installation:

1. Install dynamicFileVersion via MODX Package Manager.

Usage:

Default-Case - Embed the path to the file with version

[[!dynamicFileVersion?&file=`/template/style.css`]]

onlyVersion-Mode - Embed just the version of the file.

You need this mode, when you have a ressource as accessable Stylesheet or JavaScript (for example if you want to use parameters). Because the URI to the ressource 

is different to the path of the file.

/colors.css[[!dynamicFileVersion?&file=`/template/css/colors.css` &onlyVersion=`true`]]