[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.

addAsset("/js/app.js?123");

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" ){

to

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

Can you submit a pull request and ticket.

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057

Done and done :slight_smile:

Created pull request #216