galan / packtag

A JSP Taglib for delivering minified, combined and gzip-compressed resources (JavaScript and CSS).
Apache License 2.0
24 stars 13 forks source link

Add prefix to compressed files #3

Closed pherris closed 9 years ago

pherris commented 9 years ago

A prefix allows differentiation between the files when assessing client side performance (and possibly assists when debugging problems).

pherris commented 9 years ago

we had a race condition in AbstractCacheProvider, so made that method synchronized too.

galan commented 9 years ago

Thanks for your contribution, interessting idea adding a prefix. How do you use it? I will create a new version in my repo with your changes soon.

pherris commented 9 years ago

This allows me to add a prefix to the JSP:

<pack:script enabled="${packTagEnabled}" prefix="extjs4script">
    <src>/js-lib/ext/4.2.2/builds/ext-all-sandbox-debug.js</src>
</pack:script>

So when I look at the browser I see a JS file (we have many compacted js files) wit the name extjs4script.compact.js.333.pack.