DynamicFileVersion

dynamicfileversion

  • By dsteuer
  • Latest release August 7, 2018 (8 years ago)

About

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.

Installation & usage

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`]]

At a glance

MODX 3 compatibility unknown. Based on our testing and community reports where available.

  • Developer dsteuer
  • Latest release August 7, 2018 (8 years ago)
  • First seen in SiteDash August 6, 2018 (8 years ago)
  • License GPLv2
  • MODX support 2.5 – 100.0

Releases 1 indexed release

Changelog
MODX.com

0.1-beta1

August 7, 2018

8 years ago

—