开发者

Jammit append query string to end of file on production

Jammit does not append a query string to files 开发者_如何学Goin production environments after compiling all the assets.

This presents caching problems for me since my web server uses query strings to bust the cache.

How can I use jammit (or another tool) to properly uglify, concatenate, and append a query string?


Adding a response in case anyone else runs into this.

Jammit rewrites relative urls when concatenating css files. This is necessary because relative paths in css are relative to the file containing the path, so when css files are concatenated, these paths need to be rewritten. During this rewriting process Jammit seems to remove query params. To my understanding, to work around this you'll need to either 1) use absolute urls in your css files 2) patch Jammit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜