[coldbox-4.1] asset versioning with addAsset

To force clients to refresh there local cached copies of js files, we would append a version number after the url: app.js?123

But we can’t do this with addAsset, cause it’ll always recognise it as a css file.

For e.g.


Get’s rendered as:



Any workaround for this?

Nevermind, I simply hacked it :slight_smile:

Changed line 81 of HTMLHelper.cfc from:

if( listLast(thisAsset,".") eq "js" ){


if( FindNoCase(".js",thisAsset)){

Can you submit a pull request and ticket.

Luis Majano
Ortus Solutions, Corp
P/F: 1-888-557-8057

Done and done :slight_smile:

Created pull request #216