0 votes

uVersionClientCache

uVersionClientCache is a custom macro to always automatically version (URL querstring parameter) your files based on a MD5 hash of the file contents or file last modified date to prevent issues with client browsers caching an old file after you have changed it.

Once installed just add the macro to a template, give the file location (relative url location, e.g. /css/test.css, and select the output type & version type).  Your file will have a ?hash=... or ?modified=... appended to the end. 

For 100kb file using the lastmodifieddate, the first run overhead appears to be around 0.01-0.015 seconds, with subsequent overheads at around 0.001-0.002 seconds (assuming the default macro caching).

v0.3 release fixes trailing / for css type and also adds a media= to the macro and output.

Package owner

Patrick McAndrew

Patrick McAndrew

Patrick has 163 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.8.x (untested)
Version 8.7.x (untested)
Version 8.6.x (untested)
Version 8.5.x (untested)
Version 8.4.x (untested)
Version 8.3.x (untested)
Version 8.2.x (untested)
Version 8.1.x (untested)
Version 8.0.x (untested)
Version 7.15.x (untested)
Version 7.14.x (untested)
Version 7.13.x (untested)
Version 7.12.x (untested)
Version 7.11.x (untested)
Version 7.10.x (untested)
Version 7.9.x (untested)
Version 7.8.x (untested)
Version 7.7.x (untested)
Version 7.6.x (untested)
Version 7.5.x (untested)
Version 7.4.x (untested)
Version 7.3.x (untested)
Version 7.2.x (untested)
Version 7.1.x (untested)
Version 7.0.x (untested)
Version 6.2.x (untested)

You must login before you can report on package compatibility.

Package Information

  • Package owner: Patrick McAndrew
  • Created: 20/02/2011
  • Current version 0.3
  • License MIT
  • Downloads on Our: 1177

External resources