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.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

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

External resources